PhysicsDirectSpaceStateCastMotion Method |
Checks how far a Shape can move without colliding. All the parameters for the query, including the shape, are supplied through a PhysicsShapeQueryParameters object.
Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [1.0, 1.0] will be returned.
Note: Any Shapes that the shape is already colliding with e.g. inside of, will be ignored. Use CollideShape(PhysicsShapeQueryParameters, Int32) to determine the Shapes that the shape is already colliding with.
Namespace: Godot
public Array CastMotion( PhysicsShapeQueryParameters shape, Vector3 motion )
[Missing <param name="shape"/> documentation for "M:Godot.PhysicsDirectSpaceState.CastMotion(Godot.PhysicsShapeQueryParameters,Godot.Vector3)"]
[Missing <param name="motion"/> documentation for "M:Godot.PhysicsDirectSpaceState.CastMotion(Godot.PhysicsShapeQueryParameters,Godot.Vector3)"]
[Missing <returns> documentation for "M:Godot.PhysicsDirectSpaceState.CastMotion(Godot.PhysicsShapeQueryParameters,Godot.Vector3)"]