SFML community forums
Help => System => Topic started by: ruben98 on June 09, 2013, 08:52:06 pm
-
Hello,
I wanne make a game, and when there isn't a key pressed I wanne let the character face forward.
How do I do that.
Thanks :)
-
You could make 'forward' the default facing direction, then whenever a Key is released set direction to forward. Just one idea.
-
Hmmm that's smart but how do I do that?
-
There's a KeyReleased event I believe, and how you iterate your Direction is up to you. I just use an int 0-3 to show what way i'm going.
-
I wanne make a game, and when there isn't a key pressed I wanne let the character face forward.
How do I do that.
Have you already read the SFML tutorials? Because it seems like you haven't worked with SFML at all. If you read them, it should become obvious how to solve this problem ;)