Talos docs

PathProps

Since 0.6
Plain text

Signature

export interface PathProps {
  /** Two or more points, world frame (put the entity at the scene root). */
  points?: Vec3[]
  /** Metres per second along the path. Default 3. */
  speed?: number
  /** What happens at the last point. Default `loop`. */
  mode?: "loop" | "pingpong" | "once" | "restart"
  /** Keep it on the ground: `true`, or {@link followGround}'s options. Default off: the points' own height. */
  ground?: boolean | FollowGroundOptions
  /**
   * Roll as a ball: `true` for the radius the entity's collider (or scale) gives, a number for a radius
   * in metres. Default off: the rotation is left alone.
   */
  roll?: boolean | number
  /** Metres along the path to start at. Default 0. */
  offset?: number
  /** Emitted with `{ entity }` at the end in `once` and `restart`. Default `path-done`. */
  doneEvent?: string
}

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

Members

MemberSignatureDescription
pointspoints?: Vec3[]Two or more points, world frame (put the entity at the scene root).
speedspeed?: numberMetres per second along the path. Default 3.
modemode?: "loop" | "pingpong" | "once" | "restart"What happens at the last point. Default loop.
groundground?: boolean | FollowGroundOptionsKeep it on the ground: true, or {@link followGround}'s options. Default off: the points' own height.
rollroll?: boolean | numberRoll as a ball: true for the radius the entity's collider (or scale) gives, a number for a radius in metres. Default off: the rotation is left alone.
offsetoffset?: numberMetres along the path to start at. Default 0.
doneEventdoneEvent?: stringEmitted with { entity } at the end in once and restart. Default path-done.