Controlling player movement with free-look cinemachine camera when player is turned on 90 degrees

Hi everyone. I’m making a game with my team, where the main feature is turning gravity. We made turning gravity on each axis, it wasn’t too hard. But we got in trouble with character movement.
By changing coordinates order (e.g. (x;y;z) → (y;x;z)), I made controller, that works in different gravities, right turns player, but it works only without impact of camera. When when try to walk “on the wall” (from the player’s pov it looks like floor), camera starts to act strangely. Player starts walking in wrong directon, even in randomly sometimes, it looks buggy.
I am using Cinemachine free-look camera: orbital follow and rotation composer. Binding mode: Lock to target. I am not sure what information i should attach, so ask if you need anything. I can’t solve it already for a three days, i have no ideas what to do.

I suggest that you make a test project with Unity6, install Cinemachine 3.1.2, install the Cinemachine 3D samples, and look at the Player On Spherical Surface sample scene. It comes with a sample character controller that most likely does what you need. You can use that as-is or as inspiration for your own character controller. It’s tricky stuff to get right.

Got it, i will try to make something with it. Thank you very much

1 Like