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.

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

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)


Property Descriptions

int collider_id = 0 🔗

  • int get_collider_id()

The colliding object's ID.


RID collider_rid = RID() 🔗

  • RID get_collider_rid()

The intersecting object's RID.


int collider_shape = 0 🔗

  • int get_collider_shape()

The shape index of the colliding shape.


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).


Vector3 normal = Vector3(0, 0, 0) 🔗

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


Vector3 point = Vector3(0, 0, 0) 🔗

The intersection point.