Function Physics2DDirectSpaceState.castMotion
Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty.
Note: Both the shape and the motion are supplied through a Physics2DShapeQueryParameters
object. The method will return an array with two floats between 0 and 1, both representing a fraction of motion
. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be class="pln">D 1, 1
.