mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 05:04:10 +00:00
40 lines
2.0 KiB
XML
40 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
A box-shaped region of 3D space that detects whether it is visible on screen.
|
|
</brief_description>
|
|
<description>
|
|
[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.
|
|
If you want a node to be enabled automatically when this region is visible on screen, use [VisibleOnScreenEnabler3D].
|
|
[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].
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="is_on_screen" qualifiers="const">
|
|
<return type="bool" />
|
|
<description>
|
|
Returns [code]true[/code] if the bounding box is on the screen.
|
|
[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.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(-1, -1, -1, 2, 2, 2)">
|
|
The [VisibleOnScreenNotifier3D]'s bounding box.
|
|
</member>
|
|
</members>
|
|
<signals>
|
|
<signal name="screen_entered">
|
|
<description>
|
|
Emitted when the [VisibleOnScreenNotifier3D] enters the screen.
|
|
</description>
|
|
</signal>
|
|
<signal name="screen_exited">
|
|
<description>
|
|
Emitted when the [VisibleOnScreenNotifier3D] exits the screen.
|
|
</description>
|
|
</signal>
|
|
</signals>
|
|
</class>
|