Is this a known issue with the New Input System? Are there any workarounds or fixes available?

I’m experiencing an issue with the new Input System in Unity 6-preview. The mouse delta values are not framerate independent, causing sensitivity fluctuations when VSync is toggled.

Problem:

  • With VSync on, sensitivity is very low.
  • With VSync off, sensitivity is very high and fluctuates due to inconsistent framerate.

Code:

using UnityEngine.InputSystem;

public class PlayerController : MonoBehaviour
{
    // ...

    [SerializeField] bool useNewInoputSystem = false;

    private void Update() {
        Vector2 mouseAxis = InputManager.INSTANCE.GetLookVector2();
        if (useNewInoputSystem == false) {
            mouseAxis.x = Input.GetAxis("Mouse X");
            mouseAxis.y = Input.GetAxis("Mouse Y");
        }

        if (lookSensitivity > 0) {
            mouseAxis *= lookSensitivity / 100;
        }

        if (Cursor.lockState == CursorLockMode.Locked || Cursor.visible == false) {
            transform.Rotate(0, mouseAxis.x, 0);

            xRotation -= mouseAxis.y;
            xRotation = Mathf.Clamp(xRotation, lowerLookLimit, upperLookLimit);
            lookRoot.transform.localRotation = Quaternion.Euler(xRotation, 0, 0);
        } 

         // ...

}

Expected Behavior:
Mouse delta values should be framerate independent, maintaining consistent sensitivity regardless of VSync state.

What I’ve Tried:

I’ve extensively searched Unity documentation, forums, and online resources, but couldn’t find a solution or similar issue reported. I’ve also:

  • Verified Input System settings.
  • Tested different sensitivity values.
  • Compared behavior with the old Input System, which works perfectly with VSync.
  • Searched Unity documentation, forums, and online resources extensively.

Environment:

  • Unity 6-preview (6000.0.10f1)
  • New Input System enabled
  • Windows 10 (or other relevant OS)

Hello Everybody,

I’ve found the solution to the framerate-dependent mouse sensitivity issue with Unity 6-preview’s new Input System.

The problem lay in normalizing the look vector in InputManager.INSTANCE.GetLookVector2():

// Previous Code
public Vector2 GetLookVector2() {
    Vector2 look = inputs.Player.Look.ReadValue<Vector2>();
    return look.normalized; // Normalization caused sensitivity fluctuations
}

Removing the normalization fixed the issue:

// Solution
public Vector2 GetLookVector2() {
    Vector2 look = inputs.Player.Look.ReadValue<Vector2>();
    return look;
}

With this change, mouse delta values are now framerate-independent, maintaining consistent sensitivity regardless of VSync state.

My Bad! :sweat_smile:

1 Like