Talos docs

SwayProps

Since 0.7

The sway behavior's props: any {@link SwayTuning} field, plus where it tips and what counts as a teleport.

Plain text

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

MemberSignatureDescription
pivotpivot?: Vec3Where the body tips about, in the parent's frame. Default: the child's own position at init.
snapsnap?: numberA move further than this in one tick, metres, is a teleport and resets the measurement. Default 5.
maxAccelmaxAccel?: numberAcceleration beyond this, m/s², is clipped before it reaches the spring (a crash, a missed tick). Default 80.
kickskicks?: Record<string, SwayKickProps>Bus events that shove the springs, by event name. Default: none.