Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
PhysicsGetRestInfoResult3D
Inherits: RefCounted < Object
Stores the nearest collision information of a shape query.
Description
This class contains the collision data computed by PhysicsDirectSpaceState3D.get_rest_info_into().
If the shape collides with multiple objects, only the nearest collision is stored.
Note: For optimal performance results, it is recommended to create this object in advance, store it, and reuse it for every subsequent query.
Properties
|
||
|
||
|
||
|
||
|
||
|
Property Descriptions
int get_collider_id()
The colliding object's ID.
RID get_collider_rid()
The intersecting object's RID.
int get_collider_shape()
The shape index of the colliding shape.
Vector3 collider_velocity = Vector3(0, 0, 0) 🔗
Vector3 get_collider_velocity()
The colliding object's velocity Vector3. If the object is an Area3D, the result is (0, 0, 0).
Vector3 normal = Vector3(0, 0, 0) 🔗
Vector3 get_normal()
The collision normal of the query shape at the intersection point, pointing away from the intersecting object.
Vector3 point = Vector3(0, 0, 0) 🔗
Vector3 get_point()
The intersection point.