0 votes

I'm trying to use root motion on a 2D animation. I can select the animated position as root motion track in the animation tree (e.g. the root bone). However, when I retrieve the root motion transform and try to apply it to my Kinematicbody2D, it doesn't do anything since the root motion transform is an identity matrix. I guess this is as documented:

If root_motion_track is not a path to a track of type Animation.TYPE_TRANSFORM, returns an identity transformation."

The problem is, TYPE_TRANSFORM is only usable with spatial nodes (which of course my 2D bone isn't.)

Is 2D root motion currently not supported, or am I missing something?

Godot version 3.3.2
in Engine by (15 points)

1 Answer

0 votes
Best answer

Root motion is only supported in 3D, not 2D.

As a workaround, you can use a 3D camera in orthogonal mode instead of relying on the 2D engine.

by (10,950 points)
selected by

Good to know. I'm planning to do a pixel art game so this is unfortunately not an option for me. Are there any plans that this will be supported for 2D at some point? I couldn't find any github issues related to it, but I really can't imagine that noone ever had the need for this.

As far as I know, there are no plans to add root motion in 2D. That said, root motion is generally unadvised when you need precision movement mechanics, especially when jumping is involved. Since a fair amount of people are working on precision platformers and the like in 2D, this may explain why root motion in 2D isn't requested often.

Also, it's possible to create a pixel art game in 3D using the viewport stretch mode. See Multiple resolutions for more information.

That makes a lot of sense. I think I focused a little too much on that root motion topic and forgot the importance of character controls. Thanks for pointing me at the right direction.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.