title: How to create mouse look using the new input system?
body: <p>I'm trying to create a smooth mouse look for my First-Person game. using the new input system like so:</p>
  <pre><code>public class MouseLook : MonoBehaviour
  {
      [SerializeField] float sensitivityX = 8f;
          [SerializeField] float sensitivityY = 0.5f;
          float mouseX, mouseY;
          [SerializeField] Transform playerCamera;
          [SerializeField] float xClamp = 75f;
          float xRotataion = 0f;
       private void Update()
       { 
               transform.Rotate(Vector3.up, mouseX * Time.fixedDeltaTime);
               xRotataion -= mouseY;
               xRotataion = Mathf.Clamp(xRotataion, -xClamp, xClamp);
               Vector3 targetRotation = transform.eulerAngles;
               targetRotation.x = xRotataion;
               playerCamera.eulerAngles = targetRotation;
      } 
       public void ReceiveInput(Vector2 mouseInput) 
          {
               mouseX = mouseInput.x * sensitivityX;
               mouseY = mouseInput.y * sensitivityY;
          }
  }
  </code></pre>
  <p>Here is the <code>InputManager</code> class :</p>
  <pre><code>Vector2 mouseInput;
   private void Awake() 
    { groundMovement.MouseX.performed += ctx =&gt; mouseInput.x = ctx.ReadValue&lt;float&gt;();
          groundMovement.MouseY.performed += ctx =&gt; mouseInput.y = ctx.ReadValue&lt;float&gt;();
  }
    private void Update()
      {
          movement.ReceiveInput(horizontalInput);
          mouseLook.ReceiveInput(mouseInput); 
      }
  
      private void OnEnable()
      {
          controls.Enable(); 
      }
  
      private void OnDestroy()
      {
          controls.Disable(); 
      }
  </code></pre>
  <p>However, for some reason the mouse movement is jittery. So I wanted to use my code I was using before for the old input system which is this:</p>
  <pre><code> [SerializeField][Range(0.0f, 0.5f)] float mouseSmoothTime = 0.03f;
      [SerializeField] float mouseSensitivity = 3.5f;
      float cameraPitch = 0.0f;
      Vector2 currentMouseDelta = Vector2.zero;
      Vector2 currentMouseDeltaVelocity = Vector2.zero;
  
      private void Update()
      {
         
          Vector2 targetMouseDelta = new Vector2(Input.GetAxis(&quot;Mouse X&quot;), Input.GetAxis(&quot;Mouse Y&quot;));
  
      currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime);
  
      cameraPitch -= currentMouseDelta.y * mouseSensitivity;
  
      cameraPitch = Mathf.Clamp(cameraPitch, -90.0f, 90.0f);
  
      playerCamera.localEulerAngles = Vector3.right * cameraPitch;
  
      transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity);
  }
  </code></pre>
  <p>But how can I configure this for the new input system and still be able to use this ?</p>
  <pre><code>public void ReceiveInput(Vector2 mouseInput) 
          {
               mouseX = mouseInput.x * sensitivityX;
               mouseY = mouseInput.y * sensitivityY;
          } 
  </code></pre>