Old Input System (GetAxis("Horizontal")) to New Input System?

I’m having trouble transferring my code into the new input system. I’ve searched and searched, but for some reason, I don’t know how to make this code:

        // physical movement
        var movement = Input.GetAxis("Horizontal");
        transform.position += new Vector3(movement, 0, 0) * Time.deltaTime * MovementSpeed;
        animator.SetFloat("MovementSpeed", Mathf.Abs(movement));

        // rotation based on movement direction
        if (movement > 0)
        {
            transform.rotation = Quaternion.Euler(0, 90, 0);
        }
        if (movement < 0)
        {
            transform.rotation = Quaternion.Euler(0, 270, 0);
        }

into the new input system. I already have it set up in the Input Manager, but I don’t know how to do this! Can someone please help me? Thanks, y’all.

A simple way is to simply reference the input action via the inspector: Class InputActionReference | Input System | 1.7.0

Then use InputActionReference.action.ReadValue<float>(), for example, if you have it set up as an axis.

There’s more than one way, of course. The docs highlight the various workflows you can use with the new input system: Input System Workflows | Input System | 1.7.0