On Sat, 7 Feb 2009, Timothy McDowell wrote:
> Is there a simple method that returns the distance between two objects?I am
> thinking of writing a Tower Defense in Shoes, but I was hoping for
> predefined collision detection (I know shoes isn't a game library, so I'm
> not holding my breath on that one) or a 'distance_to' method.
I haven't noticed one, or any collision detection methods built in.
It would be tricky to do precisely *and* efficiently for anything
without a simple (rectangular, circular) shape. The Alice 2 system
uses bounding cuboids for its 3D collisions, but then for humanoids
the touching doesn't work accurately. The Wikipedia pages for
"Collision detection", "Bounding volume" and "Convex hull" are
really rather good. I'm not familiar with Tower Defense, so don't
know how much complexity you need.
HTH
Hugh