when i map this:
Keys[EPA_MOVE_FORWARD] = irr::KEY_RBUTTON;
i doesn't work ingame
quick question mouse key
Okay, are you trying to use an array of "SKeyMap"? If you are then each array element actually has two parts. I think it's a struct or like a struct, anyway, off track.
If you are using "SKeyMap" then each array element has an 'Action' part and a 'KeyCode' part.
http://irrlicht.sourceforge.net/docu/cl ... r.html#a12
Take a look.
EDIT:
I just realized that I might be wasting your time here. I used this for defining keys for a FPS camera. I don't know if it'll work for other things.
If you are using "SKeyMap" then each array element has an 'Action' part and a 'KeyCode' part.
Code: Select all
keyMap[0].Action = EKA_MOVE_FORWARD;
keyMap[0].KeyCode = KEY_UP;
keyMap[1].Action = EKA_MOVE_BACKWARD;
keyMap[1].KeyCode = KEY_DOWN;
keyMap[2].Action = EKA_STRAFE_LEFT;
keyMap[2].KeyCode = KEY_LEFT;
keyMap[3].Action = EKA_STRAFE_RIGHT;
keyMap[3].KeyCode = KEY_RIGHT;
Take a look.
EDIT:
I just realized that I might be wasting your time here. I used this for defining keys for a FPS camera. I don't know if it'll work for other things.
"The reputation of a thousand years may be determined by the conduct of one hour."
-Japanese Proverb
-Japanese Proverb
Take a look at the OnEvent function or write your own. Its quite possible that the function doens't take into account a possible mouse click.
Take a look at http://irrlicht.sourceforge.net/docu/st ... Event.html and
http://irrlicht.sourceforge.net/docu/na ... .html#a179
particularly:
Code: Select all
// If event is mouse input
if( event.EventType == irr::EET_MOUSE_INPUT_EVENT){
// If mouse cursor moved
if(event.MouseInput.Event == irr::EMIE_LMOUSE_PRESSED_DOWN){
return true;
}
}
http://irrlicht.sourceforge.net/docu/na ... .html#a179
particularly:
Code: Select all
struct {
s32 X
s32 Y
f32 Wheel
EMOUSE_INPUT_EVENT Event
} MouseInput
"The reputation of a thousand years may be determined by the conduct of one hour."
-Japanese Proverb
-Japanese Proverb