Skip to main content

Interface ISpeedTracker

Provides read-only access to an actor's current speed in SI, MPH, and KPH units so that HUD displays, data-loggers, and metric calculators can all read speed without coupling to a specific physics back-end.

public interface ISpeedTracker

Remarks​

Exposing multiple unit properties rather than a single unit avoids repeated conversion arithmetic in every consumer. The HUD shows MPH for the participant, the data logger records KPH for cross-study comparison, and the AI PID uses SI values directly.

The interface deliberately does not include a setter because speed is always a derived measurement of the physics simulation; callers that need to change speed do so through IMoveable.

Properties​

Speed​

Gets the current speed in meters per second.

float Speed { get; }

Property Value​

float

SpeedKPH​

Gets the current speed converted to kilometers per hour (KPH).

float SpeedKPH { get; }

Property Value​

float

SpeedMPH​

Gets the current speed converted to miles per hour (MPH).

float SpeedMPH { get; }

Property Value​

float