Small World Engine API Reference - v0.78.00
    Preparing search index...

    Class StageMovementBehavior

    Behavior providing 2.5D stage character locomotion entirely in normalized (u, v) stage-space: zone containment, forced-perspective scale, and local movement axes are all plain 2D polygon math traced directly on the background art. uvToWorld is the only place a 3D world position is ever produced, and it's a fixed, simple formula -- there is no camera-based reconstruction anywhere in this class.

    Hierarchy (View Summary)

    Index
    activeZone: StageZone | undefined
    customUvToWorld: ((u: number, v: number) => StageWorldPlacement) | undefined
    enabled: boolean = true
    facingOffset: number
    isActive: boolean = true
    moveForward: number = 0
    onStateChange: ((state: "IDLE" | "WALK" | "RUN") => void) | undefined
    onZoneChange: ((zone: StageZone) => void) | undefined
    projection: StageProjection
    rotationSpeed: number
    runMultiplier: number
    speed: number
    target: CameraInterfaceData | Object3D | undefined = undefined

    The object this behavior is attached to. Set automatically.

    uuid: string = ...
    zones: StageZone[]
    inspector: Record<string, InspectorField> = ...

    Inspector schema (ADR 0016 Phase 0 -- the first Behavior subclass to populate this). The four projection.* fields are always rendered, even in "custom" mode (where they're harmlessly unused) -- the same already-established pattern as OscillatorBehavior's amplitude/frequency staying visible regardless of its chosen type. Conditional visibility based on projection.mode is a Maker PropertyPanel concern (ADR 0016 Phase 2), not something this schema itself needs to express.

    • Returns an independent copy of this behavior (own uuid, target cleared -- the caller is expected to attachBehavior() it onto the new host, which sets target correctly via onAttach()). Used by Object3D.clone() (Maker's Duplicate command).

      Returns Behavior