Talos docs

ControllerComponent

Since 0.6
Plain text

Signature

export interface ControllerComponent {
  type: "controller"
  kind: "player"
  speed: number
  jump: number
  crouch?: boolean
  /** `"auto"` (default): the engine feeds the device into the controller; `"script"`: a behaviour owns it. */
  input?: "auto" | "script"
  /** For `auto` input: the frame the move stick is read in. Default `"camera"`. */
  inputBasis?: "world" | "controller" | "camera"
  /** Downward acceleration, m/s²; absent, the length of the scene's `meta.gravity`. */
  gravity?: number
  /** Terminal velocity, m/s; absent, 55. */
  maxFallSpeed?: number
  /** Tallest ledge walked up without jumping, metres; absent, 0.3. */
  step?: number
}

Import: import type { ControllerComponent } from "@argus/gameplay"

Members

MemberSignatureDescription
typetype: "controller"
kindkind: "player"
speedspeed: number
jumpjump: number
crouchcrouch?: boolean
inputinput?: "auto" | "script""auto" (default): the engine feeds the device into the controller; "script": a behaviour owns it.
inputBasisinputBasis?: "world" | "controller" | "camera"For auto input: the frame the move stick is read in. Default "camera".
gravitygravity?: numberDownward acceleration, m/s²; absent, the length of the scene's meta.gravity.
maxFallSpeedmaxFallSpeed?: numberTerminal velocity, m/s; absent, 55.
stepstep?: numberTallest ledge walked up without jumping, metres; absent, 0.3.