no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


0.8.4:animationcontroller [2022/06/21 21:33] (current) – created admin
Line 1: Line 1:
 +====== Animation Controller ======
  
 +<file pascal>
 +// 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
 +</file>