Signed distance field collisions in 2D

Started by
-1 comments, last by celloe 10 years, 2 months ago

I've been eyeing up this article for a little while - http://lab.polygonal.de/?p=239

My idea is to get a collision detection system working in AS3 based on a bitmap representing static terrain, convert it to a SDF and collide an AABB against it - so essentially, terrain can be generated based on any image, as opposed to inputting polygon information and vertices etc. The signed distance field method seems suitable for this, but I'm having trouble actually understanding the implementation - unfortunately, that article is the clearest of the sources on it I've come across. Could anybody provide an explanation as to how to go about actually implementing the algorithm for this?

This topic is closed to new replies.

Advertisement