Gondwana Game Engine
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Movement.MovementState Struct Reference

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...

Properties

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.

Detailed Description

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.

Property Documentation

◆ 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

MovementSpace Gondwana.Movement.MovementState.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.).

◆ Velocity

Vector2 Gondwana.Movement.MovementState.Velocity
getset

Velocity in current MotionSpace units per second.