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)
