Fps character vertical mouse aim

Hi All,

I need some advice if possible. I’m making an FPS game. The player character rotates left and right fine via mouse look, the hands/weapon are set up via rigging fine.
The issue I’m having is that I’m not sure of the best way to use mouse look to rotate the characters upper body to follow the aim direction. I can setup a multi aim comstraint, and moving the aim target manually in the scene view does make the character look at it dynamically. The bit I’m missing though is how to affect this target using script so it rotates with mouse look up and down. If I create a child object sat within the player and rotate this, with the aim object as a child of this, I would expect it to work but the aim constraint doesn’t follow it. It seems like the aim constraint won’t work if it’s a local/child object.
Hoping there’s a standard method to use to do this - it’s going to be multiplayer so I need the character to be visibly leaning back and and forth to other players. Purely rotating the spine via mouse without using rigging doesn’t work as it’s not transmitted across multiplayer. Sorry for the brain dump! Really need some pointers as my passion for this game will start to take a dive.
Thanks! :slight_smile:

So in the end I added an additional game object at the same position as the spine pivot, rotating that via script, and a rig with a rotation constraint that rotates the spine using this objects rotation. A bit of a hack but it seems to work well and I’m assuming the network animator in netcode/fishnet will display these. Not something that’s covered in any tutorials I’ve seen as they’re all 3rd person so there’s no risk of infinite positi8ning loops with the camera attached to the rotation that’s happening.Feel free to close admin.

1 Like

Good to hear you solved it.
You can mark the post Resolved, yourself. There are Thread tools at the top, edit the title tag

1 Like