Hi all,
Firstly, greetings! I am new to game development (not new to programming) and i have come seeking help! Hope we get along =)
Anyway here's my problem:
I'm in a project for school, and i need to develop a racing game.
What i need to know is if theres a function somewhere in Irrlicht that detects when the player releases the key, that mirrors GLUT's keyup function e.g. Press W to accelerate, let go and it stop accelerating.
I've checked the API and searched the forums but i can't seem to find what i need.
Yoroshiku onegaishimasu.
Key release detection?
ah.. hmm. i've gone through the tutorials, or at least most of them.
is there an example of how i can implement something so that it happens the moment the key is released?
i currently rely on default:, which looks like a bad idea
edit: i now have a second problem: when i try to accelerate and turn at the same time, the moment i release the second key triggers the apparent release of the first key as well.
edit 2: nevermind. i discovered this. thanks anyway =D
is there an example of how i can implement something so that it happens the moment the key is released?
i currently rely on default:, which looks like a bad idea
edit: i now have a second problem: when i try to accelerate and turn at the same time, the moment i release the second key triggers the apparent release of the first key as well.
edit 2: nevermind. i discovered this. thanks anyway =D
Sorry, but i have a problem with the solution i found on the how-to forums and i'm not supposed to ask questions there, and the thread is way old anyway.
my problem is that the when i press and hold.. "Turn-Right" for example, my vehicle turns for a microsecond, pauses, then continues turning. Is there a way to make it so that it turns without the microsecond pause?
code available on request
my problem is that the when i press and hold.. "Turn-Right" for example, my vehicle turns for a microsecond, pauses, then continues turning. Is there a way to make it so that it turns without the microsecond pause?
code available on request
You need to go through that thread again. When bool keys is used properly you'll not have that problem. It has to do with your key repeat.... go about half way down and keless has a post about how to do it right... copy his code and follow his instructions. The first post of his the code doesn't quite work and the last post someone else made is A LOT of extra code -.-