Description
Godot version
3.3.2.stable.official
System information
Windows 10, GLES 3, GTX 2060
Issue description
In Godot 3.2.3 and previous versions, if you had more than one camera in a scene with "current" activated, the last one in tree order would become the current camera.
For example here lvl_camera shoud become current when the scene loads.
In Godot 3.3.2 it seems it's no longer the case. The first camera in tree order seems to be the one that becomes current. There is something even more weird. In the same example if I move the Player node below the lvl_camera node like this:
When the scene loads lvl_camera will be current but as soon as the player moves, the camera inside the player will become current.
Another thing I noticed is that if I check the remote tree both cameras have current set to true. It also seems to happen only when the camera is part of an instanced scene.
Maybe something wrong here? https://github.com/godotengine/godot/blame/ee115d7b2d5385a80710c0f0a16009640193ff93/scene/2d/camera_2d.cpp#L417
Steps to reproduce
- Open Node2D.tscn in the provided project
- run the scene
Expected: Only one camera should have current set to true. lvl_camera should be active
Actual: Both cameras have current set to true. player/camera is active
Alternative test:
- Open Node2D.tscn in the provided project
- Swap the tree order of player and lvl_camera so that player comes last:
- Run the scene
- Move the player using arrow keys
Expected: Only one camera should have current set to true. player/camera should be active
Actual: Both cameras have current set to true. lvl_camera is active until you move the player, then player/camera becomes active. Both still show current ☑ in the remote tree
Activity