Language

Rigidbody2d.addforce with forcemode2d.impulse not working with Vertical

I try to make my character move four direction on the map and i want to stop it when there is no input. Script works on horizontal moves but not working with vertical moves. It is adds forces continuous and it is look like force stacking. I need your help :)