You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the VisibleOnScreenNotifier2D "screen_entered" and "screen_exited" signal will only be emitted once when on or off screen. It will wont be fired or emitted again after that.
Steps to reproduce
1)Create a sprite and add VisibleOnScreenNotifier2D as child
2)Add camera2d and add codes so that the camera can be pan or move (use arrow keys for camera movement)
3)VisibleOnScreenNotifier2D will make the sprite visible when on screen and visible=false when exited the screen.
4)Use arrow keys to move the camera and make the sprite enter or exit the camera view.
If you make your sprite invisible, it makes VisibleOnScreenNotifier2D invisible, which makes it never appear of screen (because it's invisible).
VisibleOnScreenNotifier2D in 4.0 is more performant and accurate, because it uses actual drawing code to determine whether it's visible, but as a result, the node has to be visible.
btw no need to toggle sprite's visibility. It will be culled automatically when off-screen.
@KoBeWi If this is intended by design for v4 , sure fine. But please put into document this new behavior of this node since it does behave differently compared to v3.5.
Godot version
4.0 rc1 official
System information
Windows 11, RTX3070, Vulkan
Issue description
I noticed that the VisibleOnScreenNotifier2D "screen_entered" and "screen_exited" signal will only be emitted once when on or off screen. It will wont be fired or emitted again after that.
Steps to reproduce
1)Create a sprite and add VisibleOnScreenNotifier2D as child
2)Add camera2d and add codes so that the camera can be pan or move (use arrow keys for camera movement)
3)VisibleOnScreenNotifier2D will make the sprite visible when on screen and visible=false when exited the screen.
4)Use arrow keys to move the camera and make the sprite enter or exit the camera view.
Minimal reproduction project
TestVisibilityNotifierBug.zip
The text was updated successfully, but these errors were encountered: