How Can I Turn Off look_at IK?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Alack Sunrider

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?

:bust_in_silhouette: Reply From: Alack Sunrider

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.