Click or drag to resize

PhysicsDirectSpaceStateGetRestInfo Method

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.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Dictionary GetRestInfo(
	PhysicsShapeQueryParameters shape
)

Parameters

shape
Type: GodotPhysicsShapeQueryParameters

[Missing <param name="shape"/> documentation for "M:Godot.PhysicsDirectSpaceState.GetRestInfo(Godot.PhysicsShapeQueryParameters)"]

Return Value

Type: Dictionary

[Missing <returns> documentation for "M:Godot.PhysicsDirectSpaceState.GetRestInfo(Godot.PhysicsShapeQueryParameters)"]

See Also