Talos docs

FirstPersonRig

Since 0.6
Plain text

Signature

export class FirstPersonRig implements CameraRig {
  readonly kind = "first-person" as const
  readonly config: FirstPersonConfig
  yaw: number
  pitch: number
  pose: CameraPose
  bob: BobState
  constructor(config: Partial<FirstPersonConfig> = {})
  get bobConfig(): Required<BobConfig> | null
  get inheritsFov(): boolean
  followTarget(ctx: Ctx): EntityHandle | null
  update(ctx: Ctx, dt: number, input: RigInput): CameraPose
  setHeading(yaw: number, pitch: number): void
}

Import: import { FirstPersonRig } from "@argus/gameplay"

Members

MemberSignatureDescription
kindreadonly kind = "first-person" as const
configreadonly config: FirstPersonConfig
yawyaw: number
pitchpitch: number
posepose: CameraPose
bobbob: BobStateThe walk bob this tick; all zero while the bob is off or the target stands still.
constructorconstructor(config: Partial<FirstPersonConfig> = {})
bobConfigget bobConfig(): Required<BobConfig> | nullThe bob's settings with the defaults filled in, or null while it is off.
inheritsFovget inheritsFov(): booleanTrue while the rig names no fov of its own: the director then sends none, and the scene camera's stands.
followTargetfollowTarget(ctx: Ctx): EntityHandle | null
updateupdate(ctx: Ctx, dt: number, input: RigInput): CameraPose
setHeadingsetHeading(yaw: number, pitch: number): void