<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.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>Game Design</title><link>http://forums.xna.com/forums/44.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Spaceship sight</title><link>http://forums.xna.com/forums/thread/196638.aspx</link><pubDate>Sun, 05 Jul 2009 20:01:34 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:196638</guid><dc:creator>Skygaz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/196638.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=44&amp;PostID=196638</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Dave Carlile:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;This may not be the best way, but this seems like a reasonable solution...&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;get a rotation matrix from the quaternion&lt;br /&gt;
&lt;span style="font-family:courier new;font-size:13px;"&gt;Matrix matrix = Matrix.CreateFromQuaternion(shipOrientation);&lt;br /&gt;
&lt;br /&gt;
// use the forward vector from the matrix to determine the direction the ship is facing&lt;br /&gt;
// this vector should already be normalized&lt;br /&gt;
Vector3 shipDirection = matrix.Forward;&lt;br /&gt;
&lt;br /&gt;
// if you want to draw something 100 units out from the ship you can find the point using the direction vector&lt;br /&gt;
aimPosition = shipDirection * 100.0f;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now draw&amp;nbsp;your aiming sight at aimPosition.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks for the answer :D</description></item><item><title>Re: Spaceship sight</title><link>http://forums.xna.com/forums/thread/195845.aspx</link><pubDate>Thu, 02 Jul 2009 20:59:38 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:195845</guid><dc:creator>Dave Carlile</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/195845.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=44&amp;PostID=195845</wfw:commentRss><description>This may not be the best way, but this seems like a reasonable solution...&lt;br /&gt;
&lt;br /&gt;
// get a rotation matrix from the quaternion&lt;br /&gt;
&lt;span style="font-size:13px;font-family:courier new;"&gt;Matrix matrix = Matrix.CreateFromQuaternion(shipOrientation);&lt;br /&gt;
&lt;br /&gt;
// use the forward vector from the matrix to determine the direction the ship is facing&lt;br /&gt;
// this vector should already be normalized&lt;br /&gt;
Vector3 shipDirection = matrix.Forward;&lt;br /&gt;
&lt;br /&gt;
// if you want to draw something 100 units out from the ship you can find the point using the direction vector&lt;br /&gt;
aimPosition = shipDirection * 100.0f;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now draw your aiming sight at aimPosition.&lt;br /&gt;
&lt;/span&gt;</description></item><item><title>Spaceship sight</title><link>http://forums.xna.com/forums/thread/194702.aspx</link><pubDate>Mon, 29 Jun 2009 23:41:04 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:194702</guid><dc:creator>Skygaz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/194702.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=44&amp;PostID=194702</wfw:commentRss><description>Hi all, I&amp;#39;m trying to develop a small spaceship game. I have a third person camera. To help the player to aim I need to put a sight in front of it. How can I do? Where I have to put the sight? Because if I take&amp;nbsp; the orientation of the spaceship (a quaternion) and transform the Vector3.UnitZ it seem to me to be wrong... (where I shoot is not where I&amp;#39;m aiming).&lt;br /&gt;
&lt;br /&gt;
ps: the projectile is created on the spaceship position and take the ship direction.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description></item></channel></rss>