Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

CursorLockMode.Locked breaks FreeLookCamera in new input system

Discussion in 'Cinemachine' started by charlesaverill20, Apr 18, 2021.

  1. charlesaverill20


    Jan 24, 2019
    I'm having some issues with locking the cursor and using the FreeLookCamera in conjunction with the new input system. Ideally, I'd want the cursor locked at the center of the screen with `CursorLockMode.Locked`, and the delta from the mouse movements is what rotates the camera.

    This was functioning properly before I implemented the new input system. Now that I have implemented it, whenever I lock the cursor in this way, I can't rotate the camera at all. If I use Confined or don't lock the mouse at all, I'll be able to rotate the camera, but only until the mouse hits the edge of the screen, so a full 360' rotation around the player character is not possible.

    My "Look" axis in the new input system uses `Delta [Pointer]`, but I've tried `Delta [Mouse]` as well, same outcome. I'm using the Cinemachine Input Provider script with my Look axis placed in the `XY Axis` field.

    Am I doing something clearly wrong here? I feel like I've done everything I can to make the camera function like it did before. Is there something I'm missing?

    Edit: Tested my build and this issue does not occur on Mac. I've been testing and developing on the Linux editor, so it's probably an issue there.
    Last edited: Apr 18, 2021
  2. Gregoryl


    Unity Technologies

    Dec 22, 2016