Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

PhysicsCastMotionResult2D

Hérite de : RefCounted < Object

Stores the result of a shape motion cast query.

Description

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.

Propriétés

float

safe_fraction

1.0

float

unsafe_fraction

1.0


Descriptions des propriétés

float safe_fraction = 1.0 🔗

  • float get_safe_fraction()

The maximum fraction of the motion that can be made without a collision.


float unsafe_fraction = 1.0 🔗

  • float get_unsafe_fraction()

The minimum fraction of the distance that must be moved for a collision.