class_visibilitynotifier.rst 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the VisibilityNotifier.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_VisibilityNotifier:
  5. VisibilityNotifier
  6. ==================
  7. **Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  8. **Inherited By:** :ref:`VisibilityEnabler<class_VisibilityEnabler>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Detects when the node is visible on screen.
  13. Properties
  14. ----------
  15. +-------------------------+-----------------------------------------------------+
  16. | :ref:`AABB<class_AABB>` | :ref:`aabb<class_VisibilityNotifier_property_aabb>` |
  17. +-------------------------+-----------------------------------------------------+
  18. Methods
  19. -------
  20. +-------------------------+-------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibilityNotifier_method_is_on_screen>` **(** **)** const |
  22. +-------------------------+-------------------------------------------------------------------------------------+
  23. Signals
  24. -------
  25. .. _class_VisibilityNotifier_signal_camera_entered:
  26. - **camera_entered** **(** :ref:`Camera<class_Camera>` camera **)**
  27. Emitted when the VisibilityNotifier enters a :ref:`Camera<class_Camera>`'s view.
  28. .. _class_VisibilityNotifier_signal_camera_exited:
  29. - **camera_exited** **(** :ref:`Camera<class_Camera>` camera **)**
  30. Emitted when the VisibilityNotifier exits a :ref:`Camera<class_Camera>`'s view.
  31. .. _class_VisibilityNotifier_signal_screen_entered:
  32. - **screen_entered** **(** **)**
  33. Emitted when the VisibilityNotifier enters the screen.
  34. .. _class_VisibilityNotifier_signal_screen_exited:
  35. - **screen_exited** **(** **)**
  36. Emitted when the VisibilityNotifier exits the screen.
  37. Description
  38. -----------
  39. 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.
  40. Property Descriptions
  41. ---------------------
  42. .. _class_VisibilityNotifier_property_aabb:
  43. - :ref:`AABB<class_AABB>` **aabb**
  44. +----------+-----------------+
  45. | *Setter* | set_aabb(value) |
  46. +----------+-----------------+
  47. | *Getter* | get_aabb() |
  48. +----------+-----------------+
  49. The VisibilityNotifier's bounding box.
  50. Method Descriptions
  51. -------------------
  52. .. _class_VisibilityNotifier_method_is_on_screen:
  53. - :ref:`bool<class_bool>` **is_on_screen** **(** **)** const
  54. If ``true``, the bounding box is on the screen.
  55. 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.