Hello all, I’m making a sidescroller. When both the left and right arrow keys are down, I want the character to stop, if not it keeps continuing at a slower speed due to I’m not using GetAxisRaw. It’s a Rigidbody2D.
Also, when the character is stopping due to both keys held down, I want it to decrease speed gradually as if NO arrow keys were held down. Right now it stops immediately, and if I let go of the key I pressed down last, it continues at the same speed as it had when both keys were pressed down. I don’t want that to happen, I just want it to decrease speed until it stays still.
How do I write this?