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.