Please help! Player spine rotation issue

Hi all.

I have been making an FPS for 4 months. My character is a PBR Robot character from the asset store. On mouse look, I have a script that rotates the entire character left and right , but guns and camera are attached to the spine and the up down rotation I am applying to the spine. This works well in single player, but attempting to network my game The spine vertical movement seems to not work when the animator component is on. The player works fine locally but I can’t seem to get any spine rotation across the network when the animator is on. Is there a different way I should be doing this? Should I be using the animator for the actual body rotation up and down, or is there a way to stop the animation applying to the spine bone, or something else. Any help massively appreciated as I’ve been stuck for a while. Thanks!

You should only need to modify what the camera is doing, as I think some animators use camera.forward to set arm aiming. There was a code monkey youtube vid on that, I’ll see if I can find it.

But the camera should be separate, and only read the last spine(spine.006 = head) to know position and rotation. You’re saying it’s parented to it?

Found it, but I think most new models do this, not sure if the one you have now does or not

Very kind, thanks! I’m almost there - I set up a multi aim costraint controlling the spine. Works perfectly when the source object is in the scene outside the character, strangely it doesn’t work when I use a GO that is a child of the characters camera . . Not sure why!

Not fully sure on that one, I’d have to see the differences in the code.

But normally if something is different from a lone object from a child-ed object, you’d have to change calls from transform.position to a objectA.transform.localPosition and since it would use localPositions, things normally need to be like aimDirection.normalized, as local space is different than world space. But directions should always be normalized anyway, as to use that in other code can relate to it’s distance:

normalizedDirection * 0.5f; // half one unit forward
normalizedDirection * 10f; // ten units forward

I haven’t used that aim/look thing yet, as none of my current projects quite use 3rd person in that way. But if you give a good example of what you tried works, and doesn’t work as pasted code? I’m sure someone or myself can see what’s wrong. :slight_smile: