<?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 Algorithms</title><link>http://forums.xna.com/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/99686.aspx</link><pubDate>Fri, 24 Oct 2008 07:55:20 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:99686</guid><dc:creator>matieman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/99686.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=99686</wfw:commentRss><description>how about rendering a depth map of the space around the player? Yhen the collision will be just as easy as in the height map collision sample.&lt;br /&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30426.aspx</link><pubDate>Thu, 01 Nov 2007 16:57:16 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30426</guid><dc:creator>Charles Humphrey</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30426.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30426</wfw:commentRss><description>I have now put up a post using a OOBB. There is also a project you can download and have a play with, see the post for the download &lt;a href="http://xna-uk.net/blogs/randomchaos/archive/2007/11/01/oobb-collision-detection.aspx"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;br&gt;The code for the OOBB comes from &lt;a href="http://channel9.msdn.com/Niners/Minh"&gt;Minh at Channel 9&lt;/a&gt;. All I have done is added his stuff to a project.&lt;br&gt;&lt;br&gt;Hope you find it of some use.&lt;br&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30384.aspx</link><pubDate>Thu, 01 Nov 2007 12:01:18 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30384</guid><dc:creator>Signot</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30384.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30384</wfw:commentRss><description>Found yet another resource.&amp;nbsp; This one is a simplified paper, should help.&lt;br&gt;&lt;br&gt;&lt;a href="http://chrishecker.com/images/e/e7/Gdmphys3.pdf"&gt;http://chrishecker.com/images/e/e7/Gdmphys3.pdf&lt;/a&gt;&lt;br&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30376.aspx</link><pubDate>Thu, 01 Nov 2007 10:59:08 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30376</guid><dc:creator>Signot</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30376.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30376</wfw:commentRss><description>Hey Nelson,&lt;br&gt;&lt;br&gt;Glad the paper helped, and hopefully I can try and answer a few questions for you too.&amp;nbsp; Don't take my word on this, I am only vaguely remebering reading some of these solutions or techniques a while back.&lt;br&gt;&lt;br&gt;1)&amp;nbsp; Regular response, should be handle by the paper.&amp;nbsp; If the player is running straight into the wall, the sliding vector will cause the player to stop at the wall.&amp;nbsp; If there is an angle in the direction of collision, then it will cause the player to slide.&amp;nbsp; Depending on the angle, this could be large or small.&lt;br&gt;2) Running up some stairs - as you said is handled by the paper.&lt;br&gt;3) Elevators - are a little more tricky.&amp;nbsp; From what I remember a while back (and this may have changed with newer techniques), but the player physics object is "linked" to the elevator physics object.&amp;nbsp; In this sense, the player's physics object has become a "child" of the elevators physical object.&amp;nbsp; When the eleveator moves, all it's children will move.&amp;nbsp; This would have to be part of the physics library that you create.&lt;br&gt;4) Crushing wall - this would involve applying momentum.&amp;nbsp; Again, this adds a new layer of complexity to the physics engine.&amp;nbsp; Before we were dealing with simple collisions and their responses.&amp;nbsp; This extra step would involve calculating the forces of each movment, and applying intertia and momentum.&amp;nbsp; Think of a pool table.&amp;nbsp; If you were to write a physics library dealing with pool balls, you would have to handle collisions by applying momentum to each ball that took part in the collision.&amp;nbsp; I am pretty sure there are lots of tutorials/articles out there dealing with this problem.&amp;nbsp; It is simply a matter of applying those techniques.&lt;br&gt;&lt;br&gt;Not sure about the passes, but it would be something similar to how the Farseer physics enigne works.&amp;nbsp; It implements a pass solution like the one you are describing.&amp;nbsp; It is an impulse based method with multiple passes.&amp;nbsp; I think this is the most common way of implementing a momentum physics engine.&lt;br&gt;&lt;br&gt;here is a site that may help you:&amp;nbsp; &lt;a href="http://www.harveycartel.org/metanet/tutorials/tutorialA.html"&gt;http://www.harveycartel.org/metanet/tutorials/tutorialA.html&lt;/a&gt;&lt;br&gt;As well here:&amp;nbsp;&lt;a href="http://www.cs.brown.edu/courses/gs007/lect/sim/web/murat.html"&gt; http://www.cs.brown.edu/courses/gs007/lect/sim/web/murat.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://www.impulse-based.de/"&gt;http://www.impulse-based.de/&lt;/a&gt;&lt;br&gt;&lt;br&gt;If you want more, look up I-Collide or Impulse Based Dynamic Simulations.&amp;nbsp; There are a lot of papers out there.&amp;nbsp; Good luck.&lt;br&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30188.aspx</link><pubDate>Tue, 30 Oct 2007 20:17:27 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30188</guid><dc:creator>Lord Ikon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30188.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30188</wfw:commentRss><description>In his post there is a link to a physics project/engine he is working on. I assume he was talking about a 3D physics component inside his project.</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30187.aspx</link><pubDate>Tue, 30 Oct 2007 19:59:21 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30187</guid><dc:creator>Chin VPL</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30187.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30187</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;FretboardOfFury:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Ayatollah: Your example (soccerball and goalie) sounds like a physics problem as&amp;nbsp;Lord Ikon has stated&amp;nbsp;(at least when in 3D) .&amp;nbsp;&amp;nbsp;You could probably set this up with the 3D physics component as well, matching the collision shapes of the goalie to the animation as you mentioned.&amp;nbsp; The only collision response would be that of the soccerball, represented by a collision sphere, off of the collision shape(s) of the goalie.
&lt;P&gt;Good luck!&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;Total noob at 3D models et al. Is there any good places to look at for this information? You say &lt;STRONG&gt;&lt;EM&gt;the &lt;/EM&gt;&lt;/STRONG&gt;3D physics component, was that a figure of speech or were you referencing a physics component that is out there?&lt;/P&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30186.aspx</link><pubDate>Tue, 30 Oct 2007 19:52:17 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30186</guid><dc:creator>Lord Ikon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30186.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30186</wfw:commentRss><description>You might do a search in the forums, someone posted the code to calculate a rotated bounding box from the XNA bounding box type.</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30180.aspx</link><pubDate>Tue, 30 Oct 2007 19:10:33 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30180</guid><dc:creator>Charles Humphrey</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30180.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30180</wfw:commentRss><description>&lt;P&gt;Having played with this I now see what you are getting at, the Intersects method does not take the position of the corners into account, rather it just uses the distance the edge of the box is from the center of the model and so you lose the rotation.&lt;/P&gt;
&lt;P&gt;I got the impression that the bounding box was rotating as I draw my box's in debug and as these appear in world space it rotates, but the Intersect method does not take this transformation into account :( and so they stay flat.&lt;/P&gt;
&lt;P&gt;So you could get the corners from the bounding box and transform them and then use those positions against the transformed corners of the target intersecting bounding box and check for collision that way. I might be talking pants here, but will try and get this working :) Nothing like a new project eh...&lt;/P&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30171.aspx</link><pubDate>Tue, 30 Oct 2007 18:36:08 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30171</guid><dc:creator>FretboardOfFury</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30171.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30171</wfw:commentRss><description>&lt;P&gt;For those interested,&amp;nbsp;I'm adding collision support&amp;nbsp;for heightmaps&amp;nbsp;and rays to my 3D physics component within the next couple of weeks (&lt;A href="http://www.codeplex.com/OopsFramework"&gt;http://www.codeplex.com/OopsFramework&lt;/A&gt;).&amp;nbsp; This, along with&amp;nbsp;other static collision shapes (boxes, spheres, wedges and&amp;nbsp;planes are all implemented) could&amp;nbsp;probably define a fairly complex world&amp;nbsp;with somewhat accurate collision response.&amp;nbsp; If you make the playable character's&amp;nbsp;collision shape a&amp;nbsp;sphere, the collision responses should naturally occur as usual.&amp;nbsp; Take a look at the example application included with the source code to get an idea.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Ayatollah: Your example (soccerball and goalie) sounds like a physics problem as&amp;nbsp;Lord Ikon has stated&amp;nbsp;(at least when in 3D) .&amp;nbsp;&amp;nbsp;You could probably set this up with the 3D physics component as well, matching the collision shapes of the goalie to the animation as you mentioned.&amp;nbsp; The only collision response would be that of the soccerball, represented by a collision sphere, off of the collision shape(s) of the goalie.&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30152.aspx</link><pubDate>Tue, 30 Oct 2007 16:53:15 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30152</guid><dc:creator>Lord Ikon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30152.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30152</wfw:commentRss><description>Sounds good, might come in handy.</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30149.aspx</link><pubDate>Tue, 30 Oct 2007 16:49:53 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30149</guid><dc:creator>Charles Humphrey</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30149.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30149</wfw:commentRss><description>Ah! Yes I see what you mean now, I am indeed building the bounding box myself in a custom model content pipeline. I will be posting the code any how.</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30144.aspx</link><pubDate>Tue, 30 Oct 2007 16:37:32 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30144</guid><dc:creator>Lord Ikon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30144.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30144</wfw:commentRss><description>It would have to be your own calculated bounding box,&amp;nbsp;the XNA BoundingBox is always axis aligned. There was actually a thread on how to use that bounding box and then create your own rotated one.</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30135.aspx</link><pubDate>Tue, 30 Oct 2007 15:59:59 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30135</guid><dc:creator>Charles Humphrey</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30135.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30135</wfw:commentRss><description>&lt;P&gt;Lord Ikon,&lt;/P&gt;
&lt;P&gt;I use bounding box's a lot on 3D models, and I don't have to do any extra calculation to get it to rotate, it rotates with the model and I don't use a third party physics component either.&lt;/P&gt;
&lt;P&gt;It may be we are going about generating the boundingbox in different ways. I was going to put some screen shots up, but have decided that this will now be my next blog post, give me a day or two and I will have an example project up for you to down load.&lt;/P&gt;</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30125.aspx</link><pubDate>Tue, 30 Oct 2007 14:36:50 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30125</guid><dc:creator>Lord Ikon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30125.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30125</wfw:commentRss><description>Unless you do the math yourself, you cannot rotate bounding boxes. You would likely want a physics component setup that could detect the collision of a mesh of the player with the ball to get a semi-accurate bounce off of it, however I'm sure there are ways to cheat.</description></item><item><title>Re: Collision Detection - How?n00b time</title><link>http://forums.xna.com/forums/thread/30109.aspx</link><pubDate>Tue, 30 Oct 2007 13:43:17 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:30109</guid><dc:creator>Chin VPL</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/30109.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=45&amp;PostID=30109</wfw:commentRss><description>&lt;P&gt;I am very interested in this also. If I was to have an animated&amp;nbsp;character model, for instance a goalkeeper, how would I go about applying collision detection with a ball? Obviously bounding boxes would need to be moved/rotated in accordance with the animation, is this actually feasible or should there be another way?&lt;/P&gt;
&lt;P&gt;It is slightly different but along the same lines.&lt;/P&gt;</description></item></channel></rss>