0 votes

Looking to test out the newly added Root Motion as presented here:

https://godotengine.org/article/godot-gets-new-animation-tree-state-machine

Spent a few hours trying to get this to work, but haven't found any real success. I'm able to use the RootMotionView to confirm that my configuration is valid, but when running the project, I don't see any root motion occurring (instead the effect seems to be that the motion of the selected Root Motion track is cancelled out, leaving the object motionless). I've resorted to lots of random configurations and validating them against RootMotionView successfully, but I am unable to see the result I expect when running the project.

I've attempted using the armature root bone as well as the armature itself as the Root Motion Track, both with results that make sense when previewed in RootMotionView.

If anyone has found success with this feature, it'd be great if I can have a working example to work with and perhaps find what I'm misunderstanding.

Below is a quick display of what I'm experiencing. After running the project, I'm expecting the character to move forward as presented by the RootMotionView. Perhaps I'm not understanding what Root Motion is supposed to achieve?

issue-example

asked Nov 24, 2018 in Engine by itbrandonsilva (15 points)

1 Answer

+2 votes
Best answer

It's OK if it looks like the movement is cancelled and your character is in place, you should get the the transform using getrootmotion_transform and apply it to your character.
The idea is to animate position/rotation/scale in your authoring tool and your AnimationTree will give you the transform.
I downloaded the TPS demo and studied how it works:

Testing root motion

answered Nov 24, 2018 by davidoc (708 points)
selected Nov 24, 2018 by itbrandonsilva

Oh, I didn't realize the TPS demo was already available. I thought it was still in development to be made available for the 3.1 release. Here it is, for others:

https://github.com/godotengine/tps-demo/

Thanks for the direction, now I can finally move forward with this.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.