set sensitivity for event receiver

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kean
Posts: 2
Joined: Wed Jul 31, 2013 7:13 am

set sensitivity for event receiver

Post by kean »

Is there a way to set the sensitivity for the event receiver?

for example

if(receiver.IsKeyDown(irr::KEY_KEY_W))
index++;

instead of index = 1,2,3,4,5,6.....etc whenever W is press

"index" gets added multiple times.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: set sensitivity for event receiver

Post by mongoose7 »

else
index = 0;
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: set sensitivity for event receiver

Post by hybrid »

In most cases you check for the up event. Otherwise key repeat will return some down event, or may not.
Post Reply