SwayProps
Since 0.7
The sway behavior's props: any {@link SwayTuning} field, plus where it tips and what counts as a teleport.
Signature
export interface SwayProps extends Partial<SwayTuning> {
/** Where the body tips about, in the parent's frame. Default: the child's own position at init. */
pivot?: Vec3
/** A move further than this in one tick, metres, is a teleport and resets the measurement. Default 5. */
snap?: number
/** Acceleration beyond this, m/s², is clipped before it reaches the spring (a crash, a missed tick). Default 80. */
maxAccel?: number
/** Bus events that shove the springs, by event name. Default: none. */
kicks?: Record<string, SwayKickProps>
}
Import: import type { SwayProps } from "@argus/gameplay"
Members
| Member | Signature | Description |
|---|---|---|
pivot | pivot?: Vec3 | Where the body tips about, in the parent's frame. Default: the child's own position at init. |
snap | snap?: number | A move further than this in one tick, metres, is a teleport and resets the measurement. Default 5. |
maxAccel | maxAccel?: number | Acceleration beyond this, m/s², is clipped before it reaches the spring (a crash, a missed tick). Default 80. |
kicks | kicks?: Record<string, SwayKickProps> | Bus events that shove the springs, by event name. Default: none. |