<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — SKeymap and addCameraSceneNodeFPS]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=389&amp;type=atom" />
	<updated>2009-09-17T21:30:04Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=389</id>
		<entry>
			<title type="html"><![CDATA[Re: SKeymap and addCameraSceneNodeFPS]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1485#p1485" />
			<content type="html"><![CDATA[<p>Yep that worked perfectly.Thanks</p>]]></content>
			<author>
				<name><![CDATA[Kronos]]></name>
				<uri>https://gprogs.com/profile.php?id=267</uri>
			</author>
			<updated>2009-09-17T21:30:04Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1485#p1485</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SKeymap and addCameraSceneNodeFPS]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1484#p1484" />
			<content type="html"><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; the BMAX call to addCameraSceneNodeFPS is slightly different than the C++ call.&nbsp; instead of having to pass the # of keys i take advantage of BMAX and you just need to pass a BMAX array of SKeyMap objects.&nbsp; another difference is that the mod uses setters/getters to access properties so the action and keycode properties on SKeyMap become get/setAction and get/setKeyCode.&nbsp; the code would look something like (this is untested):<br /></p><div class="codebox"><pre><code>Local keyMap:SKeyMap[8]

&#039; we must create an instance using the create method
keyMap[0] = SKeyMap.create()
keyMap[0].setAction(EKA_MOVE_FORWARD)
keyMap[0].setKeyCode(EKEY_KEY_UP)

keyMap[1] = SKeyMap.create()
keyMap[1].setAction(EKA_MOVE_FORWARD)
keyMap[1].setKeyCode(EKEY_KEY_W)

keyMap[2] = SKeyMap.create()
keyMap[2].setAction(EKA_MOVE_BACKWARD)
keyMap[2].setKeyCode(EKEY_KEY_DOWN)

keyMap[3] = SKeyMap.create()
keyMap[3].setAction(EKA_MOVE_BACKWARD)
keyMap[3].setKeyCode(EKEY_KEY_S)

keyMap[4] = SKeyMap.create()
keyMap[4].setAction(EKA_STRAFE_LEFT)
keyMap[4].setKeyCode(EKEY_KEY_LEFT)

keyMap[5] = SKeyMap.create()
keyMap[5].setAction(EKA_STRAFE_LEFT)
keyMap[5].setKeyCode(EKEY_KEY_A)

keyMap[6] = SKeyMap.create()
keyMap[6].setAction(EKA_STRAFE_RIGHT)
keyMap[6].setKeyCode(EKEY_KEY_RIGHT)

keyMap[7] = SKeyMap.create()
keyMap[7].setAction(EKA_STRAFE_RIGHT)
keyMap[7].setKeyCode(EKEY_KEY_D)

&#039; now you should just need to call the command
Local cam:ICameraSceneNode = smgr.addCameraSceneNodeFPS(Null, 100, .5, -1, keyMap)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2009-09-17T12:00:52Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1484#p1484</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[SKeymap and addCameraSceneNodeFPS]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1483#p1483" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Can someone tell me how to change the default keys for AddCameraSceneNodeFPS. I want to change the arrow keys to standard WASD but am having trouble doing this. I&#039;ve tried doing doing this as per tutorial on the Irrlicht Wiki but it doesn&#039;t seem to work.</p>]]></content>
			<author>
				<name><![CDATA[Kronos]]></name>
				<uri>https://gprogs.com/profile.php?id=267</uri>
			</author>
			<updated>2009-09-17T09:56:44Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1483#p1483</id>
		</entry>
</feed>
