Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

If you're using AddVelocity on a rigidbody it might be better to set it to ForceMode2D.Impulse, then add a check in Update that limits the player's speed. Also make sure you're using GetKey instead of GetKeyDown, since GetKeyDown only fires the frame the button is pressed, while GetKey fires every frame it's pressed. And make sure you set the player's rigidbody to "interpolate" in the inspector if you haven't already so the player doesn't get stuck in walls from moving too fast. I obviously don't know exactly what you're code looks like, but I hope these tips were useful!