summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorPaul Joannon <hello@pauljoannon.com>2022-08-14 10:09:35 +0200
committerPaul Joannon <hello@pauljoannon.com>2022-08-22 09:18:08 +0200
commit6bc0be16a54862af2f75c8ed12109c079349ad17 (patch)
treed0efc51759e69284ac730fb31d45b657a0776ea2 /doc/classes
parent0c5f254956f0115e363ce08045dd178dc30b54f8 (diff)
Expose the collider RID in Raycast nodes
Create and expose the method `get_collider_rid` in `RayCast2D` and `Raycast3D`. This method returns the `RID` of the first object that the ray intersects, or an empty `RID` if no object is intersecting the fay (i.e. `is_colliding` returns `false`).
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/RayCast2D.xml6
-rw-r--r--doc/classes/RayCast3D.xml6
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 4f4395a433..08627b0bd5 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -47,6 +47,12 @@
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]).
</description>
</method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<description>
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index 7cc6fc55cd..1bcd6f1f31 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -48,6 +48,12 @@
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]).
</description>
</method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<description>