0 votes

Hi! I need characters to look at each other for the game I'm working on, so I downloaded the IK demo project. I'd like to be able to turn the look at off to play certain animations. However, if I just comment the part of the code that manipulates the bones, they stay in place and don't move until I close and reopen the file. I think Godot stops manipulating bones through the animation player as soon as they are manipulated elsewhere. So I think the only thing I can do is manually move these bones through code to play the animation. Does anyone have any idea how I can do that?

in Engine by (64 points)

1 Answer

0 votes
Best answer

I managed to find the solution! Apparently, the skeleton function get_bone_pose() returns the pose with the animation applied to it. After getting the pose, you need to apply it by using set_bone_global_pose_override(). You must set the last argument, persistent, to false.

by (64 points)
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 Frequently asked questions and 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 [email protected] with your username.