From 02c10454a8ab1dbde503036afcca872b98e55e67 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] Clarify expected types in RayCast3D documentation --- doc/classes/RayCast3D.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 18a544d1145..8ede8bb4c3c 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -1,10 +1,10 @@ - A ray in 3D space, used to find the first [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 [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]. @@ -45,6 +45,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]). + [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.