Hmm?

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
dejai
Posts: 522
Joined: Sat Apr 21, 2007 9:00 am

Hmm?

Post 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...
Programming Blog: http://www.uberwolf.com
bandinopla
Posts: 28
Joined: Fri Nov 24, 2006 11:05 am

Post by bandinopla »

simpler? it cant be more simpler! what r u talking about? is this a joke? :shock:
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Why not passing a keymap? :x
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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 !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply