Rotating Skeleton3D bones through code

Godot Version

4.2.2

Question

Hi, I would like to rotate the bones of the head, neck and arms when the player is aiming using code. In godot, this can be done with Skeleton3D.SetBonePoseRotation(), but when I apply the animation to the model, the bone rotation is reset.

So far, I have come up with the following options:

  1. Make the head and neck a separate model and attach it using BoneAttachment3D. The disadvantages are that the animation will have to be done more carefully so as not to tear the seam, and it will be a little more difficult with the hands.
  2. Create a separate animation with the beginning at the bottom and the end at the top (or vice versa), and then use AnimationTree to mix the animations. The disadvantage of this method is that the motion will be less accurate because it is harder to adjust the mouse sensitivity.

If anyone knows a better way, or how to improve these two, I would be very grateful.