Mouse look on a bone issue

Hello everyone,

After countless hours of testing, I decided it would be a good idea to ask the community for help, so here’s my problem: I want a bone of my character (one of the spine bone) to be controlled by the mouse.

Here’s what I tried so far:

(1)- I tried adding the mouselook script directly on the bone. Didn’t work because an animation was playing on that bone. So I tweaked the script a little so it would override the animation, and it worked, BUT… the bone x and y axis are altered, so it mouse movements don’t move the bone correctly. I can’t switch the y and x axis in the script because it is applied to other objects (can’t duplicate it too, IDK why).
Any ideas how to fix that ?

(2)- I tried applying the mouselook script on an correctly oriented empty and place it in the hierarchy.
Spine.bone.1
-Empty
–Spine.bone.2
But when I do that, the upper part of the body doesn’t animate (even If I add another animation component and script to Spine.bone.2)
Any ideas how to fix that ?

(3)- I tried LookAt() but I have the same y up problem

PLS help me, it’s very important for me :slight_smile: thanks,
Rémi

Any suggestions, ideas, or tips would be greatly welcomed

Use approach #1 and duplicate the script or add swapMyXYAxes variable to it and set it to appropriate value on each object.