Skip to content

PhysicsGetRestInfoResult3D

Inherits: RefCounted < Object

Stores the nearest collision information of a shape query.

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.

Type Name Default
int collider_id 0
RID collider_rid RID()
int collider_shape 0
Vector3 collider_velocity Vector3(0, 0, 0)
Vector3 normal Vector3(0, 0, 0)
Vector3 point Vector3(0, 0, 0)

collider_id

int collider_id = 0

The colliding object’s ID.

collider_rid

RID collider_rid = RID()

The intersecting object’s RID.

collider_shape

int collider_shape = 0

The shape index of the colliding shape.

collider_velocity

Vector3 collider_velocity = Vector3(0, 0, 0)

The colliding object’s velocity Vector3. If the object is an Area3D, the result is (0, 0, 0).

normal

Vector3 normal = Vector3(0, 0, 0)

The collision normal of the query shape at the intersection point, pointing away from the intersecting object.

point

Vector3 point = Vector3(0, 0, 0)

The intersection point.