I'm making a 2D platformer game with the default Unity 2D physics. I am implementing slopes, but my player slips down the slope because of the physics.
Here is the code I use for the player movement:
MoveInput = Input.GetAxisRaw("Horizontal");rbd2.velocity = new Vector2(MoveInput * speed, rbd2.velocity.y);//rotacion de personajeif (MoveInput > 0){ transform.localScale = new Vector3(1f, transform.localScale.y, transform.localScale.z); }if (MoveInput < 0){ transform.localScale = new Vector3(-1f, transform.localScale.y, transform.localScale.z); }