diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 4ce605303f0..de97337be77 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -12,7 +12,7 @@ RayCast3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A ray in 3D space, used to find the first :ref:`CollisionObject3D` it intersects. +A ray in 3D space, used to find the first :ref:`Object` or :ref:`CollisionObject3D` it intersects. .. rst-class:: classref-introduction-group @@ -348,7 +348,7 @@ Updates the collision information for the ray immediately, without waiting for t :ref:`Object` **get_collider**\ (\ ) |const| :ref:`🔗` -Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +Returns the first object intersected by the ray, if any (i.e. ``null`` if no object is intersecting the ray :ref:`is_colliding` and returns ``false``). This object is not guaranteed to be a :ref:`CollisionObject3D`. For instance, if the ray intersects a :ref:`CSGShape3D` or a :ref:`GridMap`, the method will return a :ref:`CSGShape3D` instance or :ref:`GridMap` instance both of which are not a :ref:`CollisionObject3D`. To validate and ensure type safety, you should explicitly check the type of the returned object before casting. .. rst-class:: classref-item-separator