Monday, November 29, 2010

SAT Collision Detection

I spent time, this evening, working on the SAT implementation.  I got it working, partially, but it needs some tweaking.  I think I am missing something.  When the OBB for the player is rotated, it treats the collision as if it were not rotated.  Very odd, but I'm starting to get the actual math and hope to have a solution soon.  Check out the link below for the updated example.  Once you pick up a powerup, the next collision with a powerup will stop you from collecting (it's supposed to stop movement entirely, like it does when moving from right to left)

Tutorial 9 with SAT collisions

I also wanted to give props for where I found this code.  I tried to decompose the "N Tutorial", but aside from nice flash demos it left a lot up to the inquisitive mind to figure out on their own.  Instead, I found this:

Rocketman Development - SAT Tutorial

No comments:

Post a Comment