Cinemachine follow player on planete

Hey there,

I’m trying to setup a camera and the behaviour that the player follow the camera direction when we move it ( like on the brackeys 3rd person video tuto ) but on a planet.

All the cinemachine setup is all good i guess, the problem i have seems to be when i add the cam.eulerAngle.y to the targetAngle on my player movement script. At the start it’s working fine but more i go far on the planet, more it’s going crazy. I’m pretty sure there is some math to do there to correct the angle to share from the camera to targetDirection, i already tried some stuff but i’m in a front of a wall here…

If somebody have some tips, knowledge to share it will help a lot,
Thanks !


You have to work in local axes and then apply the camera’s rotation to convert to worldspace.

Have a look at the SphericalSurfaceFollow Cinemachine sample scene. It implements player movement on a planet, and you can use it as an example.

1 Like

Hey Gregory, thanks so much for the fast reply, i didn’t knew sample scene were available that’s great !
Massive work with Cinemachine, i was using my own camera follow script and a feel stupid now.