Represents the current motion state of an IMovable object, including velocity, acceleration, damping, and active scripted movements. This structure is used by MovementController to track and manage both physics-based (integrated) and scripted motion behaviors.
More...
|
| MovementSpace | MovementSpace [get] |
| | What unit system these values are expressed in. Grid = tile units; Pixel = screen pixels. This may differ from the IMovable.PositionSpace in some cases (e.g., a Pixel-based mover following Grid-based Sprite, etc.).
|
| Vector2 | Velocity [get, set] |
| | Velocity in current MotionSpace units per second.
|
| Vector2 | Acceleration [get, set] |
| | Acceleration in current MotionSpace units per second^2.
|
| float? | MaxSpeed [get, set] |
| | Max speed in current MotionSpace units per second (null = no cap).
|
| float | LinearDamping [get, set] |
| | Linear damping per second in [0..1]. 0 = no damping. Apply as v *= (1 - LinearDamping * dt) in the controller. Only affects integrated movement (not scripted).
|
| readonly bool | HasMotion [get] |
| | Gets a value indicating whether the object is in motion.
|
Represents the current motion state of an IMovable object, including velocity, acceleration, damping, and active scripted movements. This structure is used by MovementController to track and manage both physics-based (integrated) and scripted motion behaviors.
◆ Acceleration
| Vector2 Gondwana.Movement.MovementState.Acceleration |
|
getset |
Acceleration in current MotionSpace units per second^2.
◆ HasMotion
| readonly bool Gondwana.Movement.MovementState.HasMotion |
|
get |
Gets a value indicating whether the object is in motion.
◆ LinearDamping
| float Gondwana.Movement.MovementState.LinearDamping |
|
getset |
Linear damping per second in [0..1]. 0 = no damping. Apply as v *= (1 - LinearDamping * dt) in the controller. Only affects integrated movement (not scripted).
◆ MaxSpeed
| float? Gondwana.Movement.MovementState.MaxSpeed |
|
getset |
Max speed in current MotionSpace units per second (null = no cap).
◆ MovementSpace
What unit system these values are expressed in. Grid = tile units; Pixel = screen pixels. This may differ from the IMovable.PositionSpace in some cases (e.g., a Pixel-based mover following Grid-based Sprite, etc.).
◆ Velocity
| Vector2 Gondwana.Movement.MovementState.Velocity |
|
getset |
Velocity in current MotionSpace units per second.