Animation Controller

// animation controller setup
  // create animation controller for handling animation transitions
  // animation transitions define how to switch from one animation to another
  // and which inputs / hotkeys are triggering
  FAnimCtrl := TGorillaAnimationController.Create(FViewport);
  // link the model to the animation controller, to apply animation transitions to
  FAnimCtrl.Model := FCharacter;
 
  // add all defined animation transitions
  LLay := FAnimCtrl.AddLayer('WalkingAnimations');
  LLay.AddTransition('idle-forward > walk-forward', 'mymodel-idle.dae', 'mymodel-walk-forward.dae', true, KeyboardMoveForward, [fpMoving], tmImmediatly);
  LLay.AddTransition('idle-backward > walk-backward', 'mymodel-idle.dae', 'mymodel-walk-backward.dae', true, KeyboardMoveBackward, [fpMoving], tmImmediatly);
  [...]
 
  // set the default animation to be played at the beginning
  FAnimCtrl.DefaultAnimation := 'mymodel-idle.dae'; // the filename of your idle animation