mirror of
https://github.com/godotengine/godot.git
synced 2025-01-26 11:51:13 +00:00
Added general notes on RayCast[2D] updating behaviour and force_raycast_update()
This commit is contained in:
parent
7494a8c3c6
commit
8d57640d37
@ -31869,6 +31869,8 @@
|
||||
RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks.
|
||||
|
||||
Only enabled raycasts will be able to query the space and report collisions!
|
||||
|
||||
RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
|
||||
</description>
|
||||
<methods>
|
||||
<method name="add_exception">
|
||||
@ -31889,6 +31891,11 @@
|
||||
Removes all collision exception for this ray.
|
||||
</description>
|
||||
</method>
|
||||
<method name="force_raycast_update">
|
||||
<description>
|
||||
Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_cast_to" qualifiers="const">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
@ -32007,6 +32014,8 @@
|
||||
RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks.
|
||||
|
||||
Only enabled raycasts will be able to query the space and report collisions!
|
||||
|
||||
RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
|
||||
</description>
|
||||
<methods>
|
||||
<method name="add_exception">
|
||||
@ -32027,6 +32036,11 @@
|
||||
Removes all collision exception for this ray.
|
||||
</description>
|
||||
</method>
|
||||
<method name="force_raycast_update">
|
||||
<description>
|
||||
Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_cast_to" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
|
Loading…
Reference in New Issue
Block a user