PathProps
Since 0.6
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
| Member | Signature | Description |
|---|---|---|
points | points?: Vec3[] | Two or more points, world frame (put the entity at the scene root). |
speed | speed?: number | Metres per second along the path. Default 3. |
mode | mode?: "loop" | "pingpong" | "once" | "restart" | What happens at the last point. Default loop. |
ground | ground?: boolean | FollowGroundOptions | Keep it on the ground: true, or {@link followGround}'s options. Default off: the points' own height. |
roll | roll?: boolean | number | 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. |
offset | offset?: number | Metres along the path to start at. Default 0. |
doneEvent | doneEvent?: string | Emitted with { entity } at the end in once and restart. Default path-done. |