SwayTuning
Since 0.7
How a body sways: a gain and a limit per channel, and the spring they share.
Signature
export interface SwayTuning {
/** Radians of pitch per m/s² of forward acceleration: nose up as it pulls away, down as it brakes. */
pitch: number
/** Radians of roll per m/s² of sideways acceleration; positive leans out of the turn (a car), negative into it (a bike). */
roll: number
/** Metres of bob per m/s² of upward acceleration: down as it lands, up as it drops away. */
bob: number
/** The largest pitch either way, radians. */
maxPitch: number
/** The largest roll either way, radians. */
maxRoll: number
/** The largest bob either way, metres. */
maxBob: number
/** The spring's natural frequency, Hz: how quickly the body catches up with the frame. */
frequency: number
/** Damping ratio: 1 settles without overshoot, below 1 rocks a little before it settles. */
damping: number
}
Import: import type { SwayTuning } from "@argus/gameplay"
Members
| Member | Signature | Description |
|---|---|---|
pitch | pitch: number | Radians of pitch per m/s² of forward acceleration: nose up as it pulls away, down as it brakes. |
roll | roll: number | Radians of roll per m/s² of sideways acceleration; positive leans out of the turn (a car), negative into it (a bike). |
bob | bob: number | Metres of bob per m/s² of upward acceleration: down as it lands, up as it drops away. |
maxPitch | maxPitch: number | The largest pitch either way, radians. |
maxRoll | maxRoll: number | The largest roll either way, radians. |
maxBob | maxBob: number | The largest bob either way, metres. |
frequency | frequency: number | The spring's natural frequency, Hz: how quickly the body catches up with the frame. |
damping | damping: number | Damping ratio: 1 settles without overshoot, below 1 rocks a little before it settles. |