<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — Gimble Lock?]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=159&amp;type=atom" />
	<updated>2007-03-15T02:30:16Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=159</id>
		<entry>
			<title type="html"><![CDATA[Re: Gimble Lock?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=643#p643" />
			<content type="html"><![CDATA[<p>ive started researching this.&nbsp; the problem occurs when the node is moving and the X of the horizontal rotation nears 270 or 90.&nbsp; i have a post out on the Irrlicht forums so lets hope someone has a thought.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-03-15T02:30:16Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=643#p643</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Gimble Lock?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=631#p631" />
			<content type="html"><![CDATA[<p>render/update is in the wrong order.&nbsp; also dont need flip as Irrlicht doesnt use it.&nbsp; i will look into the camera issue.&nbsp; looks like when its at or near 90deg its got issues.&nbsp; more than likely this wont happen if one entity is pointing at another if a camera is not involved although i havent tried it yet.&nbsp; a neat feature of iB3D is the TrackEntity feature.&nbsp; try this:<br /></p><div class="codebox"><pre><code>Import irrlicht.b3d

Global TheEngine:ib3d_engine = _g_ib3d_engine
TheEngine.Graphics3D(800,600,32)

Global MyCamera:CAMERA = TheEngine.createCamera()
Global MyCube:PRIMITIVE = TheEngine.createCube()
Global MyLight:LIGHT = TheEngine.createLight()
 
MyLight.SetColor(200,200,200)

MyCamera.Position(0,0,15)
MyCube.Position (0,0,0)

MyCamera.TrackEntity(Mycube)

While (Not TheEngine.KeyDown(KEY_SPACE))
     TheEngine.UpdateWorld
     TheEngine.RenderWorld()
     MyCamera.Move(0,0.1,0)
Wend

End</code></pre></div><p>with TrackEntity the camera looks independently of the direction of movement...&nbsp; kinda like walking forward but looking to the side.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-03-02T02:46:29Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=631#p631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Gimble Lock?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=628#p628" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Import irrlicht.b3d

Global TheEngine:ib3d_engine = _g_ib3d_engine
TheEngine.Graphics3D(800,600,32)

Global MyCamera:CAMERA = TheEngine.createCamera()
Global MyCube:PRIMITIVE = TheEngine.createCube()
Global MyLight:LIGHT = TheEngine.createLight()
 
MyLight.SetColor(200,200,200)

MyCamera.Position(0,0,15)
MyCube.Position (0,0,0)

MyCamera.Point(Mycube)

While (Not TheEngine.KeyDown(KEY_SPACE))
     TheEngine.RenderWorld()
     MyCamera.Point(Mycube)
     MyCamera.Move(0,0.1,0)

     TheEngine.UpdateWorld
     Flip -1
Wend

End</code></pre></div><p>As you can see from the code, the Camera stats pointing &quot;Forward&quot;, then moves upY but stays pointing at the cube, However when it gets to the point that the camera is pointing nearly striaght &quot;down&quot;. It thows a wobbly. (Which I think is a Gimble lock, But Gimble is a character in Bloodlines, so I my be misstaken)<br />Anyway after the lock, it wont reaquire the cube as a target to point at.</p><p>ps. Its more obvious if you add a texture.</p><p>PPs Have I put Render/update and flip in the right order?</p>]]></content>
			<author>
				<name><![CDATA[H&K]]></name>
				<uri>https://gprogs.com/profile.php?id=36</uri>
			</author>
			<updated>2007-03-02T02:12:31Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=628#p628</id>
		</entry>
</feed>
