New Input System - how to read mouse movement as X and Y axes?

In the old system I always did: Input.GetAxis(“MouseX”) and I get a value between -1 and 1. The same for Y, which is up and down. How do I do this for the new input system?

UnityEngine.InputSystem.Mouse.current.delta.ReadValue()

3 Likes

That was so simple, thanks :smile:

Sorry but this doesn’t work
Whenever I press any button on my mouse the values get entirely f* up, even if the mouse is not moving at all
Old system didn’t have this bug