Page 1 of 1

Hmm?

Posted: Fri Aug 03, 2007 3:13 pm
by dejai
I was just wondering if they are every going to encorporate a new function into the engine that allows easy use of the wasd keys and the 3rd person etc. Also are they making collision functions easier for irredit that atleast should be simpler than it is...

Posted: Fri Aug 03, 2007 7:03 pm
by bandinopla
simpler? it cant be more simpler! what r u talking about? is this a joke? :shock:

Posted: Fri Aug 03, 2007 8:52 pm
by Acki
no, what he means is: now default is up/down/left/right he wants default like WSAD... ;)

if you want WSAD as default for you, you'll have to recompile the dll (or wait until changed by dvelopers :P )...
edit CCameraFPSSceneNode.cpp and find the constructor...
there is:

Code: Select all

	// create key map
	if (!keyMapArray || !keyMapSize)
	{
		// create default key map
		KeyMap.push_back(SCamKeyMap(0, irr::KEY_UP));
		KeyMap.push_back(SCamKeyMap(1, irr::KEY_DOWN));
		KeyMap.push_back(SCamKeyMap(2, irr::KEY_LEFT));
		KeyMap.push_back(SCamKeyMap(3, irr::KEY_RIGHT));
	}
just change it for your needs and recompile... ;)

Posted: Fri Aug 03, 2007 11:25 pm
by hybrid
Why not passing a keymap? :x

Posted: Sat Aug 04, 2007 12:49 am
by Acki
hybrid wrote:Why not passing a keymap? :x
do not ask me... :lol:

or maybe add a function to CCameraFPSSceneNode.cpp that sets WASD:

Code: Select all

void CCameraFPSSceneNode::setWSAD(bool clearMap){
      // add WSAD key map
      if(clearMap) KeyMap.clear();
      KeyMap.push_back(SCamKeyMap(0, irr::KEY_KEY_W));
      KeyMap.push_back(SCamKeyMap(1, irr::KEY_KEY_S));
      KeyMap.push_back(SCamKeyMap(2, irr::KEY_KEY_A));
      KeyMap.push_back(SCamKeyMap(3, irr::KEY_KEY_D));
}
should work (not testet), but don't forget to define the function in CCameraFPSSceneNode.h and ICameraSceneNode.h... ;)

@hybrid: again, don't ask me why :lol:
well, you'll save 8 lines of code if you have a simple prog and you want to use WSAD....
but as far as you make an options menu where the user can define his own key map you'll need a keymap enyway !!! ;)