<?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: XNA First Person Camera</title>
	<atom:link href="http://jason-mitchell.com/index.php/2009/08/27/xna-first-person-camera/feed/" rel="self" type="application/rss+xml" />
	<link>http://jason-mitchell.com/xna/xna-first-person-camera/</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 21:49:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Tony Peng</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-49</link>
		<dc:creator>Tony Peng</dc:creator>
		<pubDate>Mon, 14 Mar 2011 03:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-49</guid>
		<description>Haha, I guess the blog just doesn&#039;t want me to post that snippet.

it&#039;s just the opposite of the else, which checks if the class upDownRot is less than 0, and the parameter is greater than 0.

Hopefully this time it won&#039;t censor out the entire block of text up there and replace it with a 0. :P</description>
		<content:encoded><![CDATA[<p>Haha, I guess the blog just doesn&#8217;t want me to post that snippet.</p>
<p>it&#8217;s just the opposite of the else, which checks if the class upDownRot is less than 0, and the parameter is greater than 0.</p>
<p>Hopefully this time it won&#8217;t censor out the entire block of text up there and replace it with a 0. <img src='http://jason-mitchell.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-48</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 01 Mar 2011 21:24:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-48</guid>
		<description>Glad that helped!

I&#039;d noticed the reversing of the controls myself and had implemented something similar to what you have posted in a project I had been using similar code to the stuff in the article.  I&#039;ll update the article to point this out.</description>
		<content:encoded><![CDATA[<p>Glad that helped!</p>
<p>I&#8217;d noticed the reversing of the controls myself and had implemented something similar to what you have posted in a project I had been using similar code to the stuff in the article.  I&#8217;ll update the article to point this out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Peng</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-47</link>
		<dc:creator>Tony Peng</dc:creator>
		<pubDate>Fri, 25 Feb 2011 21:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-47</guid>
		<description>if (this.upDownRot ( 0)
                    this.upDownRot += upDownRot * rotationSpeed;

Sorry for all this massive spammage. :P</description>
		<content:encoded><![CDATA[<p>if (this.upDownRot ( 0)<br />
                    this.upDownRot += upDownRot * rotationSpeed;</p>
<p>Sorry for all this massive spammage. <img src='http://jason-mitchell.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Peng</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-46</link>
		<dc:creator>Tony Peng</dc:creator>
		<pubDate>Fri, 25 Feb 2011 21:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-46</guid>
		<description>Apparently it messed up.  The last else statement is supposed to be:
else
            {
                if (this.upDownRot  0)
                    this.upDownRot += upDownRot * rotationSpeed;
                else if (this.upDownRot &gt; 0 &amp;&amp; upDownRot &lt; 0)
                    this.upDownRot += upDownRot * rotationSpeed;
            }</description>
		<content:encoded><![CDATA[<p>Apparently it messed up.  The last else statement is supposed to be:<br />
else<br />
            {<br />
                if (this.upDownRot  0)<br />
                    this.upDownRot += upDownRot * rotationSpeed;<br />
                else if (this.upDownRot &gt; 0 &amp;&amp; upDownRot &lt; 0)<br />
                    this.upDownRot += upDownRot * rotationSpeed;<br />
            }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Peng</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-45</link>
		<dc:creator>Tony Peng</dc:creator>
		<pubDate>Fri, 25 Feb 2011 21:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-45</guid>
		<description>Sorry for this *very* late reply, but that solved it.
I also suggest that you change it a bit so that if you move the right stick too much, it won&#039;t reverse the controls.

Here&#039;s what I implemented to solve this: 
if (Math.Abs(this.upDownRot + (upDownRot * rotationSpeed)) &lt; 1.0f)
                this.upDownRot += upDownRot * rotationSpeed;
            else
            {
                if (this.upDownRot  0)
                    this.upDownRot += upDownRot * rotationSpeed;
                else if (this.upDownRot &gt; 0 &amp;&amp; upDownRot &lt; 0)
                    this.upDownRot += upDownRot * rotationSpeed;
            }

it&#039;s probably not the best way to approach this, but it works for me. :)</description>
		<content:encoded><![CDATA[<p>Sorry for this *very* late reply, but that solved it.<br />
I also suggest that you change it a bit so that if you move the right stick too much, it won&#8217;t reverse the controls.</p>
<p>Here&#8217;s what I implemented to solve this:<br />
if (Math.Abs(this.upDownRot + (upDownRot * rotationSpeed)) &lt; 1.0f)<br />
                this.upDownRot += upDownRot * rotationSpeed;<br />
            else<br />
            {<br />
                if (this.upDownRot  0)<br />
                    this.upDownRot += upDownRot * rotationSpeed;<br />
                else if (this.upDownRot &gt; 0 &amp;&amp; upDownRot &lt; 0)<br />
                    this.upDownRot += upDownRot * rotationSpeed;<br />
            }</p>
<p>it&#039;s probably not the best way to approach this, but it works for me. <img src='http://jason-mitchell.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-44</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 24 Dec 2010 11:41:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-44</guid>
		<description>Thanks Tony.

I had a quick look at this and I think I see what you mean.  This happens after you rotate the camera up or down with the right thumbstick and then you move forward the camera will freely move in 3D space.  Am I right in guessing that the behaviour you are looking for is that when the player looks up and then moves forward, they will stay on the same plane while moving like in conventional FPS games?

In order to stop the player&#039;s Y component being modified after rotation you need to remove the rotation around the X axis for the translation transform.

Update the position changing line in the Update method of FirstPersonCamera to:

position += Vector3.Transform(translation, Matrix.CreateRotationY(this.leftRightRot)) * translationSpeed;

This will only transform the camera position around the Y axis (ie looking left and right).

Hope that helps</description>
		<content:encoded><![CDATA[<p>Thanks Tony.</p>
<p>I had a quick look at this and I think I see what you mean.  This happens after you rotate the camera up or down with the right thumbstick and then you move forward the camera will freely move in 3D space.  Am I right in guessing that the behaviour you are looking for is that when the player looks up and then moves forward, they will stay on the same plane while moving like in conventional FPS games?</p>
<p>In order to stop the player&#8217;s Y component being modified after rotation you need to remove the rotation around the X axis for the translation transform.</p>
<p>Update the position changing line in the Update method of FirstPersonCamera to:</p>
<p>position += Vector3.Transform(translation, Matrix.CreateRotationY(this.leftRightRot)) * translationSpeed;</p>
<p>This will only transform the camera position around the Y axis (ie looking left and right).</p>
<p>Hope that helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Peng</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-43</link>
		<dc:creator>Tony Peng</dc:creator>
		<pubDate>Wed, 22 Dec 2010 06:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-43</guid>
		<description>Nice tutorial, Jason!

I have one question though.

As I press my left stick forward, the Y increases as the Z decreases.
Shouldn&#039;t only the Z value be changing?</description>
		<content:encoded><![CDATA[<p>Nice tutorial, Jason!</p>
<p>I have one question though.</p>
<p>As I press my left stick forward, the Y increases as the Z decreases.<br />
Shouldn&#8217;t only the Z value be changing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jmitch18</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-42</link>
		<dc:creator>jmitch18</dc:creator>
		<pubDate>Tue, 11 May 2010 12:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-42</guid>
		<description>Hi Patrick,

Looks like it could be a case sensitivity issue if you are using my Camera class exactly as it is above.  Your error says you are using &quot;ViewMatrix&quot; (with an uppercase &#039;V&#039; at the start) however my Camera class declares the variable &quot;public Matrix viewMatrix&quot; (note lowercase &#039;v&#039;).

If you are using that class, I would definately recommend making the variables private and wrapping them in a property.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Hi Patrick,</p>
<p>Looks like it could be a case sensitivity issue if you are using my Camera class exactly as it is above.  Your error says you are using &#8220;ViewMatrix&#8221; (with an uppercase &#8216;V&#8217; at the start) however my Camera class declares the variable &#8220;public Matrix viewMatrix&#8221; (note lowercase &#8216;v&#8217;).</p>
<p>If you are using that class, I would definately recommend making the variables private and wrapping them in a property.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-41</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Sun, 09 May 2010 19:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-41</guid>
		<description>Hey Jason,
Great Tutorial but I am having some issues running the project. I followed the tut exactly and when I build the project and run it, this error pops up.

&#039;Cameras.Camera&#039; does not contain a definition for &#039;ViewMatrix&#039;	

Any help would be greatly appreciated.
Thanks.</description>
		<content:encoded><![CDATA[<p>Hey Jason,<br />
Great Tutorial but I am having some issues running the project. I followed the tut exactly and when I build the project and run it, this error pops up.</p>
<p>&#8216;Cameras.Camera&#8217; does not contain a definition for &#8216;ViewMatrix&#8217;	</p>
<p>Any help would be greatly appreciated.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wordpress Stats Plug-in Not Counting &#124; Jason Mitchell</title>
		<link>http://jason-mitchell.com/xna/xna-first-person-camera/#comment-40</link>
		<dc:creator>Wordpress Stats Plug-in Not Counting &#124; Jason Mitchell</dc:creator>
		<pubDate>Sun, 27 Sep 2009 13:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jason-mitchell.com/?p=75#comment-40</guid>
		<description>[...] blog gets and in particular what the most popular articles are.&#160; At the minute, it seems to be my article on a first person camera in XNA and my article about iPhone development.&#160; However, for the past month or so the plug-in [...] </description>
		<content:encoded><![CDATA[<p>[...] blog gets and in particular what the most popular articles are.&#160; At the minute, it seems to be my article on a first person camera in XNA and my article about iPhone development.&#160; However, for the past month or so the plug-in [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

