Hello gamedev, I made a video tutorial on how to solve a common problem encountered in 2D collision detection and resolution.
The issue often happens when your physical bodies live in tile-based environments. Sometimes the order in which the collisions are resolved is incorrect, and the physical body gets stuck between two tiles.
I've discovered two interesting ways to prevent (and fix) the issue, and I've created a tutorial video:
">
Enjoy!
Video description:
Foreword: this is my first time doing a video tutorial. Please excuse me for any mistake, or if the explanation wasn't clear. I've also had some technical difficulties - my microphone is broken, and my webcam has a very poor quality. I recorded the tutorial (both audio and video) using my iPhone 4S. Unfortunately the quality of the markers I'm using is also poor - they're old and I couldn't find anything better, but I will buy some better markers tomorrow.
You can see an EXPERIMENTAL implementation of the merging method here:https://github.com/SuperV1234/SSVSCollision[3]
Additional information: I've already written an article about collisions. It's outdated, but some concepts can be easier to understand in the article. I talk about spatial hashing and "overlap area" sorting, albeit in a different (and less elegant) way. If you need more info on what I'm talking about in the video, the article would be a good place to start.
http://veegamedev.wordpress.com/2012/08/14/getting-2d-collisions-right-part-one/[4]http://veegamedev.wordpress.com/2012/08/14/getting-2d-collisions-right-part-two/[5]
When I have time, I'll update the article and put it in my website. (http://http://vittorioromeo.info/[6] )
Please let me know if you need anything explained in the comments - and if you have suggestion on how I could record audio/video in a better way.
Thanks for watching.