i have a problem, i have everything set up but when i go in pause menu and move the mouse camera in the background moves as well, can anyone help me with it?
my code for pause menu:
public class PauseMenu : MonoBehaviour {
public Transform PauseMenu1;
public Transform Player;
void Update() {
if (Input.GetKeyDown(KeyCode.Escape))
Pause();
}
public void Pause ()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
if (PauseMenu1.gameObject.activeInHierarchy == false)
{
PauseMenu1.gameObject.SetActive(true);
Time.timeScale = 0;
}
else
{
PauseMenu1.gameObject.SetActive(false);
Time.timeScale = 1;
}
}
}
}
its not a first person controller. camera is like roll a ball tutorial except mine one can rotate left and right.