Demo of playing animations using TCastleSceneCore.PlayAnimation method in Castle Game Engine. This is our versatile and most recommended way to play animations. See Writing code to modify scenes and transformations: Playing animation.
You can load any 2D or 3D model (sample 2D and 3D models are available), see the detected animations inside, and play them.
You can test various PlayAnimation features:
- play forward or backward
- loop or not
- transition (animation blending), see https://castle-engine.io/wp/2018/03/21/animation-blending/ .
Note that Castle Model Viewer has "Animations" panel that also allows to test these features.
Using Castle Game Engine.
Compile by:
-
CGE editor. Just use menu items "Compile" or "Compile And Run".
-
Or use CGE command-line build tool. Run
castle-engine compilein this directory. -
Or use Lazarus. Open in Lazarus
play_animation_standalone.lpifile and compile / run from Lazarus. Make sure to first register CGE Lazarus packages. -
Or use Delphi. Open in Delphi
play_animation_standalone.dprojfile and compile / run from Delphi. See CGE and Delphi documentation for details.
