Unity 3D - Camera Follow Car on a sphere planet code problem

Job ID: 30936609

Budget: $10 – $30 USD

I want to fix a small issue code, I have added a box game object with no collision and a script that makes the box follow the car wherever it goes and it will also point to the spherical ground of the planet so the camera will look at the box and follow the car from a top view.

The reason why I made this cube is because when I focus the car using Cinemachine the camera will rotate with the car when it's flipping, and that's something I don't want to happen, I only need the camera to rotate in the Y-Axis.

I know that there is probably a better approach but I don't know how to do it.

Do you have TeamViewer?
Related categories: C# Programming Unity 3D