VisibleOnScreenNotifier2D
Detect when a node enters or exits the screen. Optimize performance by processing only visible objects.
2D
No shortcutIntermediate8 min readQuick Reference
VisibleOnScreenNotifier2D
Godot EngineKeyboard Shortcut
N/A
Where to Find
Scene dock — Create New Node > Node2D category
Best Used For
- ▸Create 2D game elements and environments
- ▸Build parallax scrolling backgrounds
- ▸Design UI components and HUD elements
Intermediate⏱ 30–60 minutes to master
Key Settings
Add:Rect:Signals:Optimize:
VisibleOnScreenNotifier2D emits signals when a node enters or exits the visible screen area. Use it to optimize performance by disabling processing for off-screen enemies, particles, and animations.
Where to Find It
Found under Node2D in Create New Node dialog.
How to Use
- Add: Add as a child of the node you want to monitor.
- Rect: Adjust the Rect property to define the detection area.
- Signals: Connect screen_entered and screen_exited signals.
- Optimize: Pause processing in screen_exited, resume in screen_entered.
Pro Tips
- Extend the rect slightly beyond the screen for pre-loading.
- Use with CharacterBody2D to pause AI when off-screen.