Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Thanks for the feedback. Can you explain more how I would implement a constant speed? I used unity and I think when the button was pressed the player's velocity was changed temporarily. How could I change that to make it that you keep accelerating while you hold the button?


Edit: I figured something out that made movement much smoother and I'll update it after the jam.

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!