Skip to content

Latest commit

 

History

History
97 lines (58 loc) · 3.04 KB

class_visibilitynotifier.rst

File metadata and controls

97 lines (58 loc) · 3.04 KB
github_url:hide

VisibilityNotifier

Inherits: :ref:`Spatial<class_Spatial>` < :ref:`Node<class_Node>` < :ref:`Object<class_Object>`

Inherited By: :ref:`VisibilityEnabler<class_VisibilityEnabler>`

Detects when the node is visible on screen.

Description

The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a :ref:`Camera<class_Camera>`'s view.

Properties

:ref:`AABB<class_AABB>` :ref:`aabb<class_VisibilityNotifier_property_aabb>` AABB( -1, -1, -1, 2, 2, 2 )

Methods

:ref:`bool<class_bool>` :ref:`is_on_screen<class_VisibilityNotifier_method_is_on_screen>` ( ) const

Signals

Emitted when the VisibilityNotifier enters a :ref:`Camera<class_Camera>`'s view.


Emitted when the VisibilityNotifier exits a :ref:`Camera<class_Camera>`'s view.


  • screen_entered ( )

Emitted when the VisibilityNotifier enters the screen.


  • screen_exited ( )

Emitted when the VisibilityNotifier exits the screen.

Property Descriptions

Default AABB( -1, -1, -1, 2, 2, 2 )
Setter set_aabb(value)
Getter get_aabb()

The VisibilityNotifier's bounding box.

Method Descriptions

If true, the bounding box 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.