class_visibilitynotifier.rst 3.0 KB

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