Making the camera pan relative to the characters orientation

I am working on a zero-gravity FPS. I want to make it so the players can roll (basically go upside down). However, with the default camera script, panning the camera makes it pan as if the character were still upright. This means that if the player is upside down then Y input will be inverted.

This is what I mean:


It’s hard to see here because you can’t see my mouse movement, but the input is basically inverted.


How should I edit the camera scripts? I’ve already tried different things like moving to ObjectSpace, doesn’t work.

Thanks!

1 Like

So I have a full break down on another post:

There are some minor things I would take into account which I do not in the above post but do in my gravity controller here:

But generally the first post explains the jist of it.

Good luck! :+1:

3 Likes