- Home /
Question by
ShadyShyGuy · Jan 29, 2019 at 04:01 PM ·
ui3dfirst-person-controllercamera followpause menu
Camera Keeps Following Mouse in Pause Menu
I am using the Unity Standard Asset First Person Camera. My pause menu works fine, the game pauses. But the camera follows my mouse. How can I fix this? Here is my pause menu script:
public static bool GameIsPaused = false;
public GameObject pauseMenuUI;
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
if (GameIsPaused)
{
Resume();
}
else
{
Pause();
}
}
}
public void Resume()
{
pauseMenuUI.SetActive(false);
Time.timeScale = 1f;
GameIsPaused = false;
}
void Pause()
{
pauseMenuUI.SetActive(true);
Time.timeScale = 0f;
GameIsPaused = true;
}
public void LoadMenu()
{
Debug.Log("Loading Menu");
}
public void QuitGame()
{
Debug.Log("Quiting");
Application.Quit();
}
Comment