I'm hoping someone can point me in the right direction since I'm a bit stuck.
I'm playing around with Nvidias PhysX engine, OpenGL and freeglut.
I wanted to implement nice and smooth camera motions, which required different handling of keyboard events, I moved from the single keyboard callback, to the keyboard callback along with keyboardUp callback as in this thread here :
GLUT Keyboard Reaction Help
The code I'm using is exactly the same as in the above thread, however, where most people ask "How do I disable keyboard delays??" mine is "How do I get it back?"
This type of handling is perfect for camera controls, but, when I bind a key to a function that creates a new actor in the simulation, the function gets called at least 10 times per key press, no matter how short.
How can I keep the current functionality for camera controls, but make the actor creation functions be called once per key press?
If anyone could point me in the right direction I'd greatly appreciate it, I know it can be done, any 3d game out there has this implemented, I just don't know how....