2D
Movement code: float horizontalMovement = Input.GetAxis(“Horizontal”) * moveSpeed;
rb.velocity = new Vector2(horizontalMovement, rb.velocity.y);
But when i insert jump code my character starts floating down and doesn’t collide with other colliders
Here’s the code:
float jumpMovement = Input.GetAxis(“Jump”) * jumpForce;
rb.velocity = new Vector2(rb.velocity.x, jumpMovement);