animation.createLocomotionController

Section: Animator State Machine

What it does

animation.createLocomotionController creates a LocomotionController in animation. It takes id, idleClip, walkClip and runClip. runClip is optional.

Signature

animation.createLocomotionController(id, idleClip, walkClip, runClip?)

Arguments

  • id
  • idleClip
  • walkClip
  • runClipoptional

Example · generated

function start() {  animation.createLocomotionController('locomotionController', 1, 1);}

animation.createLocomotionController is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.

22 members in animation