i am a brasilian studant to game development (my english is very bad sorry). I am making a 2d plataform game to test unity codes. Initially the project use original input maneger system but i wanted test de new input system. After implementation new input system the player character is moving backward when i jump and colide in a wall Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Animations; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Haptics; using UnityEngine.UI; public class Player : MonoBehaviour { private bool _pular = false; // Variavel que recebe se um valor de pulo foi acionado [SerializeField] public float _speed = 5f; // velocidade de movimento [SerializeField] private float _jump; // Força do pulo private Rigidbody2D rig; // Componente Rigdbody2D private bool isJumping; private bool doublejump; private Animator anim; // Componente Animator private float auxJump; private float auxMove; private float auxMoveSpeed; private float auxJumpSpeed; [SerializeField] private SelecaoSkin skin; [SerializeField] private Sprite sprite; private void Start() { rig = GetComponent<Rigidbody2D>(); // Importando o componente Rigidbody 2d para o script anim = GetComponent<Animator>(); // Importando o componente Animator para o script changeSkin(); } private void Update() { // move(); // Movimento //jump(); // Pulo if (transform.position.y <= -36) { transform.position = new Vector2(-17.56f, -22.0f); } } public void move(InputAction.CallbackContext value) { auxMove = value.ReadValue<float>(); /*if (auxMove != 0) { Mobilemove(); } else { rig.velocity = new Vector2(Input.GetAxisRaw("Horizontal") * _speed, rig.velocity.y); }*/ rig.velocity = new Vector2(auxMove * _speed, rig.velocity.y); if (auxMove > 0) { auxMove = 1; transform.eulerAngles = new Vector3(0, 0, 0); anim.SetBool("walk", true); } else if (auxMove < 0) { auxMove = -1; transform.eulerAngles = new Vector3(0, 180, 0); anim.SetBool("walk", true); } else if (auxMove == 0) { anim.SetBool("walk", false); } } public void jump(InputAction.CallbackContext value) { _pular = value.performed; if(_pular) { if (!isJumping) { Gamepad.current.SetMotorSpeeds(0.25f, 0.75f); isJumping = true; //auxJump--; anim.SetBool("jump", true); rig.AddForce(new Vector2(0f, _jump), ForceMode2D.Impulse); doublejump = true; _pular = false; } else if (doublejump) { Gamepad.current.SetMotorSpeeds(0.25f, 0.75f); // auxJump--; doublejump = false; rig.AddForce(new Vector2(0f, _jump), ForceMode2D.Impulse); _pular = false; } } } private void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.layer == 6) { GameControler.instance.GameOver(); Destroy(this.gameObject); } if (other.gameObject.layer == 3) { isJumping = false; anim.SetBool("jump", false); } } private void OnitCollisionExit2D(Collision2D other) { if (other.gameObject.layer == 3) // se o objeto colidido estiver na camada 3(chao) { isJumping = true; // Definindo isJumping como verdadeiro } } public void changeSkin() // Sistema de troca de skin { if (GameControler.playerSkin != null) { skin = GameControler.playerSkin; } anim.runtimeAnimatorController = skin.animControler; sprite = skin.sprite; } }