Event reciever stops FPS camera from moving with arrow keys.

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
Elfloard2
Posts: 20
Joined: Sun Jan 22, 2006 4:45 am

Event reciever stops FPS camera from moving with arrow keys.

Post by Elfloard2 »

When i use the Event reciever class to get input from the user, its stops the FPS camera from moving. I have searched the forums and have not seen an answer to this problem. Please tell me how I can fix this.
raven_coda
Posts: 89
Joined: Thu Aug 17, 2006 8:11 pm
Location: Salt Lake City, UT, USA
Contact:

Post by raven_coda »

when your return from the event reciever return false rather then true. That should fix it :)
Definition of an Upgrade: Take old bugs out, put new ones in.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

bool OnEvent(SEvent event)
{
if(blahhh)
{
random stuff here.
return true;
}
return false;
}


Thats the correct way to use it, fill in the blanks though <_<
Elfloard2
Posts: 20
Joined: Sun Jan 22, 2006 4:45 am

Post by Elfloard2 »

public bool OnEvent(Event e)
{

if (e.Type == EventType.KeyInput)
{
keyboard_down[(int)e.Key] = e.KeyPressedDown;
return true;
}
return false;
}

is my .net code.
Where exactly do i make it false. I have tried everything and it still does not work.
Elfloard2
Posts: 20
Joined: Sun Jan 22, 2006 4:45 am

Post by Elfloard2 »

never mind, i somehow was testing for the wrong key, your suggestions worked out right
Post Reply