'How to create mouse look using the new input system?

I'm trying to create a smooth mouse look for my First-Person game. using the new input system like so:

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;
        }
}

Here is the InputManager class :

Vector2 mouseInput;
 private void Awake() 
  { groundMovement.MouseX.performed += ctx => mouseInput.x = ctx.ReadValue<float>();
        groundMovement.MouseY.performed += ctx => mouseInput.y = ctx.ReadValue<float>();
}
  private void Update()
    {
        movement.ReceiveInput(horizontalInput);
        mouseLook.ReceiveInput(mouseInput); 
    }

    private void OnEnable()
    {
        controls.Enable(); 
    }

    private void OnDestroy()
    {
        controls.Disable(); 
    }

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:

 [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("Mouse X"), Input.GetAxis("Mouse Y"));

    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);
}

But how can I configure this for the new input system and still be able to use this ?

public void ReceiveInput(Vector2 mouseInput) 
        {
             mouseX = mouseInput.x * sensitivityX;
             mouseY = mouseInput.y * sensitivityY;
        } 


Solution 1:[1]

const elementHandle = await page.$('[name="value"]');

The method runs document.querySelector within the page. If no element matches the selector, the return value resolves to null.

Puppeteer Documentation

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1