Camera problem with joystick rotation

To start off, I’ll just let you know - this may be a confusing read!

I am using an XBOX controller for Windows on my PC , I am setting up a basic camera for a first person game. I have encountered a problem with the camera’s orientation when using my method. If I do circles with the analogue stick, the camera tilts to one side. I will try to describe this with pictures.


After 5 circles with joystick



Could anybody tell me how to stop this from happening?
I need for the camera NOT to rotate on the Y axis, it is caused by using two axis directions at once (e.g. Down+Right)
Any help is very appreciated,


You problay want one axis to be global and one axis to be local. This keeps your rotation from mixing together. So locally you might want to look up and down but World rotation to turn your head.

Thanks Redikann, appreciate it. :slight_smile:

I agree. But my solution is different have one empty for up-down rotation and one for left right. Then parent them together in the right order. Parent the camera to the last child.

I use the parenting solution for 3rd person cams, probaly works great for 1st too though.

Very clever, I could then parent the player to the left/right empty, too. Thanks Monster. :yes: