ControllerComponent
Since 0.6Changed in 0.7
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
/** Ground acceleration, m/s²; absent, 50. */
accel?: number
/** Ground braking, m/s²; absent, `accel`. */
decel?: number
/** Root-motion turn rate, deg/s; absent, 720. */
turnRate?: number
/** Tallest ledge walked up without jumping, metres; absent, 0.3. */
step?: number
}
Import: import type { ControllerComponent } from "@argus/gameplay"
Members
| Member | Signature | Description |
|---|---|---|
type | type: "controller" | |
kind | kind: "player" | |
speed | speed: number | |
jump | jump: number | |
crouch | crouch?: boolean | |
input | input?: "auto" | "script" | "auto" (default): the engine feeds the device into the controller; "script": a behaviour owns it. |
inputBasis | inputBasis?: "world" | "controller" | "camera" | For auto input: the frame the move stick is read in. Default "camera". |
gravity | gravity?: number | Downward acceleration, m/s²; absent, the length of the scene's meta.gravity. |
maxFallSpeed | maxFallSpeed?: number | Terminal velocity, m/s; absent, 55. |
accel | accel?: number | Ground acceleration, m/s²; absent, 50. |
decel | decel?: number | Ground braking, m/s²; absent, accel. |
turnRate | turnRate?: number | Root-motion turn rate, deg/s; absent, 720. |
step | step?: number | Tallest ledge walked up without jumping, metres; absent, 0.3. |