Function PhysicsDirectSpaceState.getRestInfo
Checks the intersections of a shape, given through a PhysicsShapeQueryParameters
object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
collider_id
: The colliding object's ID.
linear_velocity
: The colliding object's velocity Vector3
. If the object is an Area
, the result is (0, 0, 0)
.
normal
: The object's surface normal at the intersection point.
point
: The intersection point.
rid
: The intersecting object's RID
.
shape
: The shape index of the colliding shape.
If the shape did not intersect anything, then an empty dictionary is returned instead.