my eventreceiver is a simplified version of this http://irrlicht.sourceforge.net/phpBB2/ ... ntreceiver
So I have an array representing keys which are set to up/down/pressed...
Anyways the problem is in my custom camera class which before worked by having one function updated every frame. so it checks the array of keys and moves if the key is down.
now I split the camera function into two:
camera::does() is called every frame
camera::input() is called by the eventreceiver during OnEvent
when I press the key to move the cam forward, it moves when I press the key... stops for a few frames and then keeps moving as I hold the key down. So the eventreceiver is not being called for a few frames after the key is pressed.
In my main loop I put
while(device->run())
{
cout<<"loop"<<endl;
and in OnEvent I put
cout<<"event"<<endl;
and the ouput looks like this when I run it
...
loop
loop
loop
event //key==pressed
loop
loop
loop
loop
loop
loop
loop
event //key==down
loop
event //key==down
loop
event //key==down
loop
event //key==down
loop
event //key==down
loop
event //key==up
loop
loop
...
so there is a delay after the key is pressed.
now logically if the keys state isn't being changed its not really an event but the way the eventreceiver works OnEvent should be called shouldn't it.
sorry if I added to much irrelevant information, hopefully someone knows whats going on.
![Wink :wink:](./images/smilies/icon_wink.gif)