Hi JGO !
i have searched a long time for this kind of problem.
It occurs when i’m pressing a button and hold it (e.g. moving forward) and then pressing a another button (e.g. moving backward).
My program recognized the event from the second hit, but instead of moving the character / camera stops.
It only starts moving again when i’m pressing the second button again and hold it.
So maybe its a design mistake by my self?
Here is the event-loop for a lwjgl application:
while (Keyboard.next())
if (Keyboard.getEventKeyState())
{
if (Keyboard.getEventKey() == Keyboard.KEY_W)
cam.setMovement(FirstPersonCamera.CameraMovement.FORWARD);
if (Keyboard.getEventKey() == Keyboard.KEY_S)
cam.setMovement(FirstPersonCamera.CameraMovement.BACKWARD);
if (Keyboard.getEventKey() == Keyboard.KEY_A)
cam.setMovement(FirstPersonCamera.CameraMovement.LEFT);
if (Keyboard.getEventKey() == Keyboard.KEY_D)
cam.setMovement(FirstPersonCamera.CameraMovement.RIGHT);
//...other stuff here
}
else
cam.setMovement(FirstPersonCamera.CameraMovement.NONE);
Can it be solve by using threads or smth. similiar?
Thanks so far