Physics2DDirectSpaceState.castMotion

Checks how far a Shape2D can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a Physics2DShapeQueryParameters 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 $(D 1.0, 1.0) will be returned. Note: Any Shape2Ds that the shape is already colliding with e.g. inside of, will be ignored. Use collideShape to determine the Shape2Ds that the shape is already colliding with.

struct Physics2DDirectSpaceState
@nogc nothrow
Array
castMotion

Meta