<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jonas Westin &#187; Farseer</title>
	<atom:link href="http://jonaswestin.se/tag/farseer/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonaswestin.se</link>
	<description>work in progress</description>
	<lastBuildDate>Mon, 19 Dec 2011 22:03:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>About platform physics test01</title>
		<link>http://jonaswestin.se/about-platform-physics-test01/</link>
		<comments>http://jonaswestin.se/about-platform-physics-test01/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 09:25:41 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[Farseer]]></category>

		<guid isPermaLink="false">http://jonaswestin.wordpress.com/?p=127</guid>
		<description><![CDATA[Here comes some comments about the platform physics test01. About jumping: My first idea was to apply an impulse for jumping the character. This would however break Newton&#8217;s third law of motion (action-reaction) which isn&#8217;t really a problem as long as the ground is all static. But since I wanted my character to run around [...]]]></description>
			<content:encoded><![CDATA[<p>Here comes some comments about the platform physics test01.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="425" height="344" src="http://www.youtube.com/embed/CozuZ9MPvHA" frameborder="0" allowFullScreen="true"> </iframe></p>
<p>About jumping:</p>
<p>My first idea was to apply an impulse for jumping the character. This would however break Newton&#8217;s third law of motion (action-reaction) which isn&#8217;t really a problem as long as the ground is all static. But since I wanted my character to run around and jump from movable objects (like the rope bridge) and I wanted the bridge to be affected by the impulse as well I could not use a single impulse. Instead I created a compressed spring between the character and the ground object for a short time period.</p>
<p>About collission:</p>
<p>The problem with inCollision is that two objects in contact in reality keep bouncing against each other which makes the onCollision being called every other update. Therefore the onCollision event has the be smoothed out over several updates. I think I saw some discussions about these in the forum at http://www.codeplex.com/FarseerPhysics</p>
<p>About gravity:</p>
<p>The gravity is applied by, for each object looping through every other object and calculating the resulting gravity force between them, like this:</p>
<pre>foreach body1
   gravity=0
   foreach body2 != this
      gravity += G*m1*m2/r^2
   end
 body1.addforce(gravity)
 end</pre>
<p>where G is a constant, m1 is the mass of body1, m2 the mass of body2 and r is the distance between them.<br />
<a href="http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation"><img class="alignnone" title="Universal Gravity" src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/NewtonsLawOfUniversalGravitation.svg/400px-NewtonsLawOfUniversalGravitation.svg.png" alt="" width="223" height="156" /></a> <a href="http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation" target="_blank"></a></p>
<p><a href="http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation" target="_blank">http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jonaswestin.se/about-platform-physics-test01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diver</title>
		<link>http://jonaswestin.se/74/</link>
		<comments>http://jonaswestin.se/74/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 11:41:54 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[Farseer]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://jonaswestin.wordpress.com/2009/02/23/74/</guid>
		<description><![CDATA[Ett annat Farseerspel &#8211; Diver: http://www.farseergames.com/Games/Diver/Diver.aspx]]></description>
			<content:encoded><![CDATA[<p>Ett annat Farseerspel &#8211; Diver:</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="425" height="344" src="http://www.youtube.com/embed/eNOX78ibRRw" frameborder="0" allowFullScreen="true"> </iframe></p>
<p><a href="http://www.farseergames.com/Games/Diver/Diver.aspx" target="_blank">http://www.farseergames.com/Games/Diver/Diver.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jonaswestin.se/74/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Averagegames.com</title>
		<link>http://jonaswestin.se/averagegamescom/</link>
		<comments>http://jonaswestin.se/averagegamescom/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 10:30:58 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[Farseer]]></category>

		<guid isPermaLink="false">http://jonaswestin.wordpress.com/?p=70</guid>
		<description><![CDATA[På Averagegames.com finns två Silverlightspel som jag misstänker bygger på Farseer. http://www.averagegames.com/]]></description>
			<content:encoded><![CDATA[<p>På Averagegames.com finns två Silverlightspel som jag misstänker bygger på Farseer.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="425" height="344" src="http://www.youtube.com/embed/XSHW_7Pp8ao" frameborder="0" allowFullScreen="true"> </iframe></p>
<p><a title="Averagegames.com" href="http://www.averagegames.com/" target="_blank">http://www.averagegames.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jonaswestin.se/averagegamescom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

