Struct WildlifeGait
How an animal's legs move at a speed: steps per second, leg swing, how far into a gallop, and the body's bob. Pure, so it is tested on its own.
public readonly struct WildlifeGait
- Inherited Members
Fields
Bob
public readonly float Bob
Field Value
Gallop
public readonly float Gallop
Field Value
LegSwing
public readonly float LegSwing
Field Value
StepsPerSecond
public readonly float StepsPerSecond
Field Value
Methods
Evaluate(WildlifeBodySpec, float, float, float)
public static WildlifeGait Evaluate(WildlifeBodySpec spec, float runSpeed, float speed, float alive)
Parameters
specWildlifeBodySpecThe body (its leg length sets the stride).
runSpeedfloatThe species' run speed: a gallop is reached near it.
speedfloatMeasured ground speed, m/s.
alivefloat1 alive, 0 dead (no gait).