New Animation Tree & State Machine for Godot
Subscribe:  iCal  |  Google Calendar
Moscow RU   16, Oct — 18, Oct
Helsinki FI   17, Oct — 25, Oct
Minsk BY   17, Oct — 19, Oct
London GB   22, Oct — 23, Oct
Singapore SG   23, Oct — 25, Oct
Latest comments

bad management, its your job for stuff like that not to happen, dont put that extra weight on artist because management didn't do your job

by Robert Gardner
4 hours ago

It really is the best game of 2018, Thank you.

"We're saddened if any former members of any studio did not find their time here enjoyable or creatively fulfilling and wish them well with finding an environment more suitable to their temperaments and needs…" Or : We're saddened if any former members of our studio are not happy to have been exploited to enrich us. Awesome !!!! Ok, guys… you have lost one customer !

New Animation Tree & State Machine for Godot
28 June, 2018

Godot has been updated, getting the rewritten animation tree. Let’s check out the engine’s new features to see how it can help you develop complex 3D games.


There is a new node, AnimationTree. It does nothing by itself, so a tree root needs to be set to it:


There are plenty of nodes to put in the tree, but only a few root nodes are valid by default:

  • Animation (a regular animation)
  • BlendTree (A blend tree, similar to the previous AnimationTreePlayer)
  • BlendSpace1D and BlendSpace2D, for visual blend spaces.
  • StateMachine (a state machine)

Save for animation, any of those nodes can contain other types of nodes. Detail is as follows:


This node is similar to the old AnimationTreePlayer. It’s a run of the mill animation blend tree. Nodes have inputs and outputs and can be blended. This new implementation has a lot of visual feedback, though:


Animations show their progress with a proper bar, and active wires become blue.

It is also possible to use blend spaces, state machines and even other blend tree as sub-nodes. In the example below, two state machines are blended via a Blend2 node, with filters set. This way, a functionality similar to state machine layers (from other engines) can be achieved easily.



With the help of Thomas Herzog, both 1D and 2D blend spaces are supported in Godot.


For the 2D version, an automatic triangulation option is set by default (which can be changed to manual if required). Other engines hide it by default, but we believe it should be better that users see how blending happens behind the scenes (As well as having the freedom to change it ):



Finally, Godot introduces a state machine. This state machine is rather simple but very efficient, and relies on the concept of travel.


Conditions to change states are not supported but can be easily scripted by adding scripted transitions (we’ll see in the future whether this is worth adding to the core or can remain an extension).


You can add your own custom blending logic with the new Godot API, even writing your own state machine. The new API is very easy to extend and use:



It is also easy to set a track as root motion. If set as such, a transform with the motion for the frame can be obtained and used as well. A new node RootMotionView was added to aid in debugging root motion.



The old animation system (AnimationTreePlayer) has now been deprecated and will be removed in future versions. By the time, we will add a compatibility API so they get converted to the new system.

You can learn more about the update here

Leave a Reply

Be the First to Comment!