Inherits: Node2D < CanvasItem < Node < Object

Inherited By: VisibilityEnabler2D

Detects when the node is visible on screen.


The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.


Rect2rectRect2( -10, -10, 20, 20 )


boolis_on_screen ( ) const


  • screen_entered ( )

Emitted when the VisibilityNotifier2D enters the screen.

  • screen_exited ( )

Emitted when the VisibilityNotifier2D exits the screen.

Emitted when the VisibilityNotifier2D enters a Viewport’s view.

Emitted when the VisibilityNotifier2D exits a Viewport’s view.

Property Descriptions

DefaultRect2( -10, -10, 20, 20 )

The VisibilityNotifier2D’s bounding rectangle.

Method Descriptions

  • bool is_on_screen ( ) const

If true, the bounding rectangle is on the screen.

Note: It takes one frame for the node’s visibility to be assessed once added to the scene tree, so this method will return false right after it is instantiated, even if it will be on screen in the draw pass.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.