Strata - v1.4.10
    Preparing search index...

    Function createLocomotionMachine

    • Creates a locomotion animation machine with standard movement states.

      Parameters

      • animations: Partial<Record<"idle" | "walk" | "run" | "jump" | "fall" | "land", string>>

        Map of state names to animation clip names

      Returns StateMachine<
          {
              blendFactor: number;
              currentAnimation: string;
              isPaused: boolean;
              metadata?: Record<string, unknown>;
              playbackSpeed: number;
              previousAnimation: string | null;
              timeInState: number;
          },
          AnyEventObject,
          Record<string, AnyActorRef>,
          ProvidedActor,
          ParameterizedObject,
          ParameterizedObject,
          string,
          StateValue,
          string,
          unknown,
          NonReducibleUnknown,
          EventObject,
          MetaObject,
          any,
      >

      Configured animation machine for locomotion

      const locomotion = createLocomotionMachine({
      idle: 'Character_Idle',
      walk: 'Character_Walk',
      run: 'Character_Run',
      jump: 'Character_Jump'
      });