Warning: Undefined array key "translationlc" in /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/Action/Export.php on line 104

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/Action/Export.php on line 104
0.8.4:animationcontroller

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