<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>First Person Shooter Cameras</title><link>http://blogs.msdn.com/etayrien/archive/2007/02/02/first-person-shooter-cameras.aspx</link><description>So, it's been a long time since my last post. Sorry about that. We've been busy lately, which should put smiles on all your faces. I like my job, so I can't give any specifics, but we've got some stuff coming up we think you'll be excited about. Anyway,I</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: First Person Shooter Cameras</title><link>http://blogs.msdn.com/etayrien/archive/2007/02/02/first-person-shooter-cameras.aspx#1583985</link><pubDate>Fri, 02 Feb 2007 20:58:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1583985</guid><dc:creator>Ultrahead</dc:creator><description>&lt;p&gt;Great post.&lt;/p&gt;
&lt;p&gt;One question: in which cases would it be more handy to use &amp;quot;quaternions&amp;quot;?&lt;/p&gt;
</description></item><item><title>re: First Person Shooter Cameras</title><link>http://blogs.msdn.com/etayrien/archive/2007/02/02/first-person-shooter-cameras.aspx#1622335</link><pubDate>Thu, 08 Feb 2007 01:39:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1622335</guid><dc:creator>etayrien</dc:creator><description>&lt;p&gt;Thanks for your comment. &amp;nbsp;I was thinking about posting a quaternion based camera, but like you guessed, we've been really busy :) To answer your question, I would use a quaternion based camera in two situations:&lt;/p&gt;
&lt;p&gt;a) if the camera needs to orient in an arbitrary direction: ie any combination of roll, pitch, and yaw. &amp;nbsp;Otherwise you can get gimbal lock. &amp;nbsp;You'll have to web search for more information on what that is; I don't have the math background to explain it properly :)&lt;/p&gt;
&lt;p&gt;b) quaternions also have the handy ability to interpolate between different orientations. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-gb/library/microsoft.xna.framework.quaternion.slerp.aspx"&gt;http://msdn2.microsoft.com/en-gb/library/microsoft.xna.framework.quaternion.slerp.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This can be very useful for third person cameras. &amp;nbsp;(Think Tomb Raider) &amp;nbsp;Say, for example, your camera is facing left and up, and something happens where you want the camera to face right. Maybe your character changes directions or something. If you just change camera orientations instantly, it's very jolting for the user. &amp;nbsp;Instead, your camera can have a quaternion representing current orientation and desired orientation. Every update it can change it can say&lt;/p&gt;
&lt;p&gt;Current orientation = quaternion.slerp(current orientation, desired orientation, amt )&lt;/p&gt;
&lt;p&gt;Amt is some float value from 0 to 1 that represents how &amp;quot;far&amp;quot; through the movement you want to go. &amp;nbsp;This value will likely be based on a speed constant that you set somewhere, and your GameTime structure. &lt;/p&gt;
&lt;p&gt;These two properties make quaternion cameras very useful, but the math behind them is fairly confusing. &amp;nbsp;In cases where neither of those two are needed, I would tend towards using something similar to the camera I posted.&lt;/p&gt;
</description></item><item><title>re: First Person Shooter Cameras</title><link>http://blogs.msdn.com/etayrien/archive/2007/02/02/first-person-shooter-cameras.aspx#1623972</link><pubDate>Thu, 08 Feb 2007 07:33:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1623972</guid><dc:creator>Ultrahead</dc:creator><description>&lt;p&gt;Thanks for the answer.&lt;/p&gt;
&lt;p&gt;&amp;quot;Otherwise you can get gimbal lock. &amp;nbsp;You'll have to web search for more information on what that is ...&amp;quot;&lt;/p&gt;
&lt;p&gt;So I did. As a rule I first always pay a visit to &lt;a rel="nofollow" target="_new" href="http://en.Wikipedia.org"&gt;http://en.Wikipedia.org&lt;/a&gt;, but I've also found a pretty clear explanation of the phenomenon at this site: &lt;a rel="nofollow" target="_new" href="http://www.anticz.com/eularqua.htm"&gt;http://www.anticz.com/eularqua.htm&lt;/a&gt; (ok, 3DSMax-proned but clear).&lt;/p&gt;
</description></item><item><title>XNA 2.0 and Drawable Game Components</title><link>http://blogs.msdn.com/etayrien/archive/2007/02/02/first-person-shooter-cameras.aspx#7041129</link><pubDate>Wed, 09 Jan 2008 17:51:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7041129</guid><dc:creator>Ed Giardina's .NET Blog</dc:creator><description>&lt;p&gt;So I recently updated my XNA project to 2.0 to take advantage of the cool networking libraries and such&lt;/p&gt;
</description></item></channel></rss>