Skip to content

Commit 956e2b1

Browse files
committed
Merge pull request godotengine#101373 from jburt137/patch-1
Clarify expected types in `RayCast3D` documentation
2 parents fdd3c8a + 02c1045 commit 956e2b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/classes/RayCast3D.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<class name="RayCast3D" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
33
<brief_description>
4-
A ray in 3D space, used to find the first [CollisionObject3D] it intersects.
4+
A ray in 3D space, used to find the first object it intersects.
55
</brief_description>
66
<description>
7-
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.
7+
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.
88
[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.
99
[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].
1010
To sweep over a region of 3D space, you can approximate the region with multiple [RayCast3D]s or use [ShapeCast3D].
@@ -45,6 +45,7 @@
4545
<return type="Object" />
4646
<description>
4747
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]).
48+
[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.
4849
</description>
4950
</method>
5051
<method name="get_collider_rid" qualifiers="const">

0 commit comments

Comments
 (0)