0.2.0-dev Download ZIP
39 lines ·2.0 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A box-shaped region of 3D space that detects whether it is visible on screen. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | [VisibleOnScreenNotifier3D] represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a [Camera3D]'s view, it will emit a [signal screen_entered] signal, and likewise it will emit a [signal screen_exited] signal when no part of it remains visible. |
| 8 | If you want a node to be enabled automatically when this region is visible on screen, use [VisibleOnScreenEnabler3D]. |
| 9 | [b]Note:[/b] [VisibleOnScreenNotifier3D] uses an approximate heuristic that doesn't take walls and other occlusion into account, unless occlusion culling is used. It also won't function unless [member Node3D.visible] is set to [code]true[/code]. |
| 10 | </description> |
| 11 | <tutorials> |
| 12 | </tutorials> |
| 13 | <methods> |
| 14 | <method name="is_on_screen" qualifiers="const"> |
| 15 | <return type="bool" /> |
| 16 | <description> |
| 17 | Returns [code]true[/code] if the bounding box is on the screen. |
| 18 | [b]Note:[/b] It takes one frame for the [VisibleOnScreenNotifier3D]'s visibility to be assessed once added to the scene tree, so this method will always return [code]false[/code] right after it is instantiated. |
| 19 | </description> |
| 20 | </method> |
| 21 | </methods> |
| 22 | <members> |
| 23 | <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(-1, -1, -1, 2, 2, 2)"> |
| 24 | The [VisibleOnScreenNotifier3D]'s bounding box. |
| 25 | </member> |
| 26 | </members> |
| 27 | <signals> |
| 28 | <signal name="screen_entered"> |
| 29 | <description> |
| 30 | Emitted when the [VisibleOnScreenNotifier3D] enters the screen. |
| 31 | </description> |
| 32 | </signal> |
| 33 | <signal name="screen_exited"> |
| 34 | <description> |
| 35 | Emitted when the [VisibleOnScreenNotifier3D] exits the screen. |
| 36 | </description> |
| 37 | </signal> |
| 38 | </signals> |
| 39 | </class> |