<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 24. OpenGL Camera Part 3</title>
	<atom:link href="http://www.swiftless.com/tutorials/opengl/camera3.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.swiftless.com/tutorials/opengl/camera3.html</link>
	<description>Game Programming and Computer Graphics Tutorials</description>
	<lastBuildDate>Wed, 01 Feb 2012 09:19:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: kropcke</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-3083</link>
		<dc:creator>kropcke</dc:creator>
		<pubDate>Sun, 13 Nov 2011 06:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-3083</guid>
		<description>i&#039;ve just begun going through them with Xcode 4.0.2 - they work wonderfully.

Have fun!!

-kropcke</description>
		<content:encoded><![CDATA[<p>i&#8217;ve just begun going through them with Xcode 4.0.2 &#8211; they work wonderfully.</p>
<p>Have fun!!</p>
<p>-kropcke</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reyaad</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-2352</link>
		<dc:creator>Reyaad</dc:creator>
		<pubDate>Mon, 19 Sep 2011 18:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-2352</guid>
		<description>Hi. I&#039;m new to this site. I browsed thru your tutorials and it look excited. I&#039;m busy with XCode4 and would like to try all of them out. Don&#039;t know if it is gonna work but if so I will tell you about it. But this really looks like a great site.</description>
		<content:encoded><![CDATA[<p>Hi. I&#8217;m new to this site. I browsed thru your tutorials and it look excited. I&#8217;m busy with XCode4 and would like to try all of them out. Don&#8217;t know if it is gonna work but if so I will tell you about it. But this really looks like a great site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simple OpenGL Keyboard and Mouse FPS Controls &#124; r3dux.org</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-1648</link>
		<dc:creator>Simple OpenGL Keyboard and Mouse FPS Controls &#124; r3dux.org</dc:creator>
		<pubDate>Fri, 13 May 2011 00:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-1648</guid>
		<description>[...] and did some googling, where I came across Swiftless&#8216; camera tutorials (Part 1, Part 2, Part 3) which gave me a really good start (Thank you, Swiftless!) on how to manipulate the ModelView [...]</description>
		<content:encoded><![CDATA[<p>[...] and did some googling, where I came across Swiftless&#8216; camera tutorials (Part 1, Part 2, Part 3) which gave me a really good start (Thank you, Swiftless!) on how to manipulate the ModelView [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: UG_Cyber</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-765</link>
		<dc:creator>UG_Cyber</dc:creator>
		<pubDate>Tue, 01 Jun 2010 06:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-765</guid>
		<description>There is also another method that i found best for me.  I used the gluLookAt() to get a good 3rd person view of an object.  for instance (Just a snippet from a bigger game)

void UpdateCamera()
{
    float yRadians = Player.yrot / 180 * 3.14159;
    gluLookAt( Player.xpos - (sin(yRadians)), -0.4,  Player.zpos + (cos(yRadians)),
               Player.xpos, Player.ypos,  Player.zpos, 0.0, 1.0, 0.0);
}
with the Player struct being global.</description>
		<content:encoded><![CDATA[<p>There is also another method that i found best for me.  I used the gluLookAt() to get a good 3rd person view of an object.  for instance (Just a snippet from a bigger game)</p>
<p>void UpdateCamera()<br />
{<br />
    float yRadians = Player.yrot / 180 * 3.14159;<br />
    gluLookAt( Player.xpos &#8211; (sin(yRadians)), -0.4,  Player.zpos + (cos(yRadians)),<br />
               Player.xpos, Player.ypos,  Player.zpos, 0.0, 1.0, 0.0);<br />
}<br />
with the Player struct being global.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swiftless</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-547</link>
		<dc:creator>Swiftless</dc:creator>
		<pubDate>Wed, 21 Apr 2010 06:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-547</guid>
		<description>Hi Shadeirou,

Thats not a bad suggestion you have made there. When I get around to it, I am hoping to write a 4th camera tutorial on using quaternions instead of Eular angles. 

You have probably heard of Gimbal lock, this is when your rotations along the different axis have gone in such a way that you lose one degree of freedom. 

Therefore, looking straight up and down using this camera system, while it will mostly work, can fail miserably if you want to create something like a flight simulator.

Just a heads up if you plan to keep using this.

Cheers,
Swiftless</description>
		<content:encoded><![CDATA[<p>Hi Shadeirou,</p>
<p>Thats not a bad suggestion you have made there. When I get around to it, I am hoping to write a 4th camera tutorial on using quaternions instead of Eular angles. </p>
<p>You have probably heard of Gimbal lock, this is when your rotations along the different axis have gone in such a way that you lose one degree of freedom. </p>
<p>Therefore, looking straight up and down using this camera system, while it will mostly work, can fail miserably if you want to create something like a flight simulator.</p>
<p>Just a heads up if you plan to keep using this.</p>
<p>Cheers,<br />
Swiftless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shadeirou</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-546</link>
		<dc:creator>Shadeirou</dc:creator>
		<pubDate>Wed, 21 Apr 2010 06:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-546</guid>
		<description>Forgot to put this in my last post: the variable &quot;dist&quot; is the distance you want that camera to move forward.</description>
		<content:encoded><![CDATA[<p>Forgot to put this in my last post: the variable &#8220;dist&#8221; is the distance you want that camera to move forward.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shadeirou</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-545</link>
		<dc:creator>Shadeirou</dc:creator>
		<pubDate>Wed, 21 Apr 2010 06:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-545</guid>
		<description>Hey, nice camera tutorials.  Just wanted to make a quick suggestion. I was messing around with making a camera class myself and used the your forward movement formulas, but came across a problem: When you look straight up or down an move forward, you don&#039;t move only up or down, but also forward a bit. I decided to do the math myself and came up with a fix. Here is the code I use:

float d = dist * cos( degreeToRadian( xrot ) );
origin_.x += d * cos( degreeToRadian( yrot + 90 ) );
origin_.y += dist * sin( degreeToRadian( xrot ) );
origin_.z += d * sin( degreeToRadian( yrot + 90 ) );

This causes the x and z distances to be affected by the x-axis rotation, or the roll. Take into account that I am using the following coordinate system:

glOrtho( 0, scene_w, scene_h, 0, 0, scene_l );

Anyway, just thought I&#039;d see if this helped anyone.</description>
		<content:encoded><![CDATA[<p>Hey, nice camera tutorials.  Just wanted to make a quick suggestion. I was messing around with making a camera class myself and used the your forward movement formulas, but came across a problem: When you look straight up or down an move forward, you don&#8217;t move only up or down, but also forward a bit. I decided to do the math myself and came up with a fix. Here is the code I use:</p>
<p>float d = dist * cos( degreeToRadian( xrot ) );<br />
origin_.x += d * cos( degreeToRadian( yrot + 90 ) );<br />
origin_.y += dist * sin( degreeToRadian( xrot ) );<br />
origin_.z += d * sin( degreeToRadian( yrot + 90 ) );</p>
<p>This causes the x and z distances to be affected by the x-axis rotation, or the roll. Take into account that I am using the following coordinate system:</p>
<p>glOrtho( 0, scene_w, scene_h, 0, 0, scene_l );</p>
<p>Anyway, just thought I&#8217;d see if this helped anyone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swiftless</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-75</link>
		<dc:creator>Swiftless</dc:creator>
		<pubDate>Tue, 30 Mar 2010 22:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-75</guid>
		<description>Hi Richard,

Thanks for your feedback.

I used to have source files (and they still exist on the server), but I removed the links when I redid the site recently. I had someone else experience a copy and paste issue, because their IDE support rich text and it copied over the formatting, causing errors.

I am currently in the process of rewriting the tutorials, and it uses a code box, with a copy and paste safe ability, so I don&#039;t see a point in putting the links back up and maintaining those files.

Cheers,
Swiftless</description>
		<content:encoded><![CDATA[<p>Hi Richard,</p>
<p>Thanks for your feedback.</p>
<p>I used to have source files (and they still exist on the server), but I removed the links when I redid the site recently. I had someone else experience a copy and paste issue, because their IDE support rich text and it copied over the formatting, causing errors.</p>
<p>I am currently in the process of rewriting the tutorials, and it uses a code box, with a copy and paste safe ability, so I don&#8217;t see a point in putting the links back up and maintaining those files.</p>
<p>Cheers,<br />
Swiftless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Simpson</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-74</link>
		<dc:creator>Richard Simpson</dc:creator>
		<pubDate>Tue, 30 Mar 2010 21:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-74</guid>
		<description>Excellent website.

One thing, could you post a source file as copy and pasting of the code doesn&#039;t compile straight away on Linux.

Whilst I know that it is necessary to write it yourself to learn how it all works and know how it works but using it as a temporary snippet so is a little bit of a pain.

REALLY good site though :)

Rich</description>
		<content:encoded><![CDATA[<p>Excellent website.</p>
<p>One thing, could you post a source file as copy and pasting of the code doesn&#8217;t compile straight away on Linux.</p>
<p>Whilst I know that it is necessary to write it yourself to learn how it all works and know how it works but using it as a temporary snippet so is a little bit of a pain.</p>
<p>REALLY good site though <img src='http://www.swiftless.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swiftless</title>
		<link>http://www.swiftless.com/tutorials/opengl/camera3.html/comment-page-1#comment-27</link>
		<dc:creator>Swiftless</dc:creator>
		<pubDate>Sat, 27 Mar 2010 01:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=193#comment-27</guid>
		<description>Hi Zero,

That is almost the exact way I check for multiple key presses at a time. I plan to write this into the Keyboard tutorial as I have had it asked before.

Cheers,
Swiftless</description>
		<content:encoded><![CDATA[<p>Hi Zero,</p>
<p>That is almost the exact way I check for multiple key presses at a time. I plan to write this into the Keyboard tutorial as I have had it asked before.</p>
<p>Cheers,<br />
Swiftless</p>
]]></content:encoded>
	</item>
</channel>
</rss>

