From c229fe8563ceb3724b9a35768b1f7a8ec2e92227 Mon Sep 17 00:00:00 2001 From: jaredkunz <27638043+jaredkunz@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:20:01 -0800 Subject: [PATCH 1/4] Update RayCast3D.xml per Issue #100139 --- doc/classes/RayCast3D.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 18a544d1145c..1c13011d93a2 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -1,7 +1,7 @@ - A ray in 3D space, used to find the first [CollisionObject3D] it intersects. + A ray in 3D space, used to find the first [Object] or [CollisionObject3D] it intersects. A raycast represents a ray from its origin to its [member target_position] that finds the closest [CollisionObject3D] along its path, if it intersects any. @@ -44,7 +44,7 @@ - Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). + Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). This object is not guaranteed to be a [CollisionObject3D]. For example, if the ray intersects a [CSGShape3D] or a [GridMap], the method will return a [CSGShape3D] instance or [GridMap] instance. To validate and ensure type safety, you should explicitly check the type of the returned object before casting. From babf4e7443a8891c35c517a8bc522168a808f3e8 Mon Sep 17 00:00:00 2001 From: jburt137 <27638043+jburt137@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:14:17 -0800 Subject: [PATCH 2/4] Clarify expected types in `RayCast3D` docs, long description --- doc/classes/RayCast3D.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 1c13011d93a2..c8d94b6971cb 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -4,7 +4,7 @@ A ray in 3D space, used to find the first [Object] or [CollisionObject3D] it intersects. - A raycast represents a ray from its origin to its [member target_position] that finds the closest [CollisionObject3D] along its path, if it intersects any. + A raycast represents a ray from its origin to its [member target_position] that finds the closest object along its path, if it intersects any. [RayCast3D] can ignore some objects by adding them to an exception list, by making its detection reporting ignore [Area3D]s ([member collide_with_areas]) or [PhysicsBody3D]s ([member collide_with_bodies]), or by configuring physics layers. [RayCast3D] calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a [RayCast3D] multiple times within the same physics frame, use [method force_raycast_update]. To sweep over a region of 3D space, you can approximate the region with multiple [RayCast3D]s or use [ShapeCast3D]. From 443f3172c3c5efbc7abfae24aafd12310d8671ea Mon Sep 17 00:00:00 2001 From: jburt137 <27638043+jburt137@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:23:38 -0800 Subject: [PATCH 3/4] Update doc/classes/RayCast3D.xml Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- doc/classes/RayCast3D.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index c8d94b6971cb..0cc7668f4578 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -44,7 +44,8 @@ - Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). This object is not guaranteed to be a [CollisionObject3D]. For example, if the ray intersects a [CSGShape3D] or a [GridMap], the method will return a [CSGShape3D] instance or [GridMap] instance. To validate and ensure type safety, you should explicitly check the type of the returned object before casting. + Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). + [b]Note:[/b] This object is not guaranteed to be a [CollisionObject3D]. For example, if the ray intersects a [CSGShape3D] or a [GridMap], the method will return a [CSGShape3D] or [GridMap] instance. From 665043b26b488b26b82d89807d4d0d6208c8d2df Mon Sep 17 00:00:00 2001 From: jburt137 <27638043+jburt137@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:23:51 -0800 Subject: [PATCH 4/4] Update doc/classes/RayCast3D.xml Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- doc/classes/RayCast3D.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 0cc7668f4578..8ede8bb4c3c1 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -1,7 +1,7 @@ - A ray in 3D space, used to find the first [Object] or [CollisionObject3D] it intersects. + A ray in 3D space, used to find the first object it intersects. A raycast represents a ray from its origin to its [member target_position] that finds the closest object along its path, if it intersects any.