So I’m working on a “temple run” like game with a shifting gravity mechanic but I have no idea how to get the camera to rotate so that the ground the player is currently on will always be on the bottom. I tried transforming the quaternion axis by 90 degrees but that causes my player to be off center.
public class CamFollow : MonoBehaviour {
public Transform player;
public Vector3 offset;
void Update()
{
transform.position = player.position + offset;
}
public void Rotate()
{
transform.rotation = Quaternion.Euler(0, 0, -90);
}
}