PhysicsCastMotionResult2D
Inherits: RefCounted < Object
Description
Section titled “Description”Stores the result of a shape motion cast query.
This class contains the safe and unsafe fractions computed by PhysicsDirectSpaceState2D.cast_motion_into().
Note: For optimal performance results, it is recommended to create this object in advance, store it, and reuse it for every subsequent query.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| float | safe_fraction |
1.0 |
| float | unsafe_fraction |
1.0 |
Property descriptions
Section titled “Property descriptions”safe_fraction
float safe_fraction = 1.0
The maximum fraction of the motion that can be made without a collision.
unsafe_fraction
float unsafe_fraction = 1.0
The minimum fraction of the distance that must be moved for a collision.
