DEV Community

Discussion on: Using SDL2: Controlling our Stick Figure

Collapse
 
clan804 profile image
clan804

Hi, thanks for this tutorial, is great for noobs.
Question, when I'm not pressing a key the character keeps moving, should the character behave like this or am I doing something wrong?

Collapse
 
bushstar profile image
Peter John Bushnell

That's correct, there is no code that stops the character from moving. You can add a case to handle a SDL_KEYUP event for this.