Rigidbody character velocity physics

I have a rigidbody character with a constant velocity that is moved with joystick.

Whenever there is no input I set the velocity = 0

The problem is when I hit anything with the character thats preventing me from moving forward (Ex: wall with collider) The charater keeps lagging and roatating doing weird movements.

Any tips ?

You don’t usually change rigidbody velocity directly. It is the result of applying force or torque. You need to let the physics engine do what it needs to do rather than change velocity otherwise unexpected results can occur.