From 8d57640d3745084d5c4abc4e6926298c2f4a3fb4 Mon Sep 17 00:00:00 2001 From: Karol Walasek Date: Mon, 3 Oct 2016 11:35:40 +0200 Subject: Added general notes on RayCast[2D] updating behaviour and force_raycast_update() --- doc/base/classes.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/base/classes.xml') diff --git a/doc/base/classes.xml b/doc/base/classes.xml index c18cba09a4..d5784dfe4a 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -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. @@ -31889,6 +31891,11 @@ Removes all collision exception for this ray. + + + 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. + + @@ -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. @@ -32027,6 +32036,11 @@ Removes all collision exception for this ray. + + + 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. + + -- cgit v1.2.3