<?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>General</title><link>http://forums.xna.com/forums/32.aspx</link><description>Don't know where to post your question? Post it here!</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Getting (1,2) of a Vector2 (noob question) 0.0</title><link>http://forums.xna.com/forums/thread/172077.aspx</link><pubDate>Fri, 01 May 2009 19:15:09 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:172077</guid><dc:creator>Daniel Hanson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/172077.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=172077</wfw:commentRss><description>Just as you can access the &amp;quot;velocity&amp;quot; member of your sprite using the member-of operator &amp;#39;.&amp;#39;, you can use it to access the X and Y coordinate values of your Vector2. spr.velocity.X will give you the X coordinate, and spr.velocity.Y will give you the Y coordinate.&lt;br /&gt;&lt;br /&gt;

&lt;pre&gt;spr.destinationRect = new Rectangle(spr.velocity.X, spr.velocity.Y, spr.spriteWidth, spr.spriteHeight);&lt;/pre&gt;</description></item><item><title>Re: Getting (1,2) of a Vector2 (noob question) 0.0</title><link>http://forums.xna.com/forums/thread/172076.aspx</link><pubDate>Fri, 01 May 2009 19:06:23 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:172076</guid><dc:creator>DunhamBrosGames</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/172076.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=172076</wfw:commentRss><description>Hi, Thanks for replying, I&amp;#39;m not very good at explaining code yet, But I guess I mean.&lt;br /&gt;
I need to be able to write a Vector2 like this:&lt;br /&gt;
&lt;br /&gt;
u see I&amp;#39;ve save a velocity like this&lt;br /&gt;
&lt;div style="border:1px solid #7f9db9;overflow:auto;background-color:white;font-family:courier new;font-size:11px;"&gt;
&lt;table cellspacing="0" cellpadding="0" style="border-width:0px;border-bottom:0px solid #eeeeee;margin:2px 0px;width:99%;border-collapse:collapse;background-color:#ffffff;"&gt;
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-size:11px;"&gt;spr.velocity&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-size:11px;"&gt;&amp;nbsp;Vector2((&lt;/span&gt;&lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)Math.Cos(spr.rotation),&amp;nbsp;(&lt;/span&gt;&lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)Math.Sin(spr.rotation))&amp;nbsp;*&amp;nbsp;2;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
I move my_player like this &amp;quot;spr.my_pos += spr.velocity;&amp;quot; using Vectors&lt;br /&gt;
But i need to read it like this&lt;br /&gt;
&lt;div style="border:1px solid #7f9db9;overflow:auto;background-color:white;font-family:courier new;font-size:11px;"&gt;
&lt;table cellspacing="0" cellpadding="0" style="border-width:0px;border-bottom:0px solid #eeeeee;margin:2px 0px;width:99%;border-collapse:collapse;background-color:#ffffff;"&gt;
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-size:11px;"&gt;spr.destinationRect&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-size:11px;"&gt;&amp;nbsp;Rectangle(spr.my_x,&amp;nbsp;spr.my_y,&amp;nbsp;spr.spriteWidth,&amp;nbsp;spr.spriteHeight);&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
Without using vectors&lt;br /&gt;
Id rather replace &amp;quot;spr.my_x, spr.my_y&amp;quot; with the my_pos vecotor but I dont know how to do that.&lt;br /&gt;
so atm I&amp;#39;m tring to save the first value of my_pos vector to my_x and the second valuse to my_y.&lt;br /&gt;
&lt;br /&gt;
Or did I just make my problem even more confusing? 0.o &lt;br /&gt;</description></item><item><title>Re: Getting (1,2) of a Vector2 (noob question) 0.0</title><link>http://forums.xna.com/forums/thread/172069.aspx</link><pubDate>Fri, 01 May 2009 18:53:09 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:172069</guid><dc:creator>Ebola0001</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/172069.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=172069</wfw:commentRss><description>vector2 my_pos = new vector2(64,93)&lt;br /&gt;
&lt;br /&gt;
means&lt;br /&gt;
&lt;br /&gt;
my_pos.X is equal to 64&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
my_pos.Y is equal to 93&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if it were a vector3, the third would be the &amp;quot;X, Y, &amp;amp; Z&amp;quot; value,&lt;br /&gt;
and a vector 4 would be the &amp;quot;X, Y, Z, &amp;amp; W&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>[SOLVED] [Thank you!! n_n] Getting (1,2) of a Vector2 (noob question) 0.0</title><link>http://forums.xna.com/forums/thread/172068.aspx</link><pubDate>Fri, 01 May 2009 18:44:19 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:172068</guid><dc:creator>DunhamBrosGames</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/172068.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=172068</wfw:commentRss><description>How do I get values 1 and 2 of a Vector2&lt;br /&gt;
and use them as follows&lt;br /&gt;
&amp;nbsp;this is my my_pos Vector (64,64)&lt;br /&gt;
&lt;br /&gt;
how do i do this?&lt;br /&gt;
my_x = my_pos.value1;&lt;br /&gt;
my_y = my_pos.value2;&lt;br /&gt;
&lt;br /&gt;
Hope u understand my question any help would be great n_n&lt;br /&gt;</description></item></channel></rss>