Coding Global Background
Coding Global

Problem with Smooth Player Movement (2D)

Archived 2 years ago
❤️1
6 messages
0 members
2 years ago
Open in Discord
Z
Cüneyt

I've been trying to programm one of my first games and noticed that my character Movement was Choppy and accelerates after a while similarly to the rate of characters that are written when u hold down a key like this: ggggggggggggggggggggggggggggggggg (I know) I don't understand what I'm doing wrong, since the character Movement shouldn't depend on the speed of input because the Key is either pressed down (true) or not (false) So afterwards the first Instinct would be to look where it switches (When the Input switches from true to flase) to false and it does as intended, when u let go of the buttons (The alternative would've been like switching in between ticks) In conclusion: I don't understand why there would be acceleration or fluctuation in a KeyLististening Environment where there's only true or false. If there are any Question cuz u don't understand my bs Code lemme know I'd be happy to hear solutions Thanks a lot for reading :3 The Code is in the Picture cuz of Character Limit For anyone that needs the code to test it out DM me I guess

Problem with Smooth Player Movement (2D)

Replies (6)