The easiest collision test which can give you not just center points distance but rather object volumes intersections is AABB AABS test. The test algorithm is a straightforward (google for it as I don't one here...) Use object.debugBoundingBox or debugBoundingBoxSphere to get bounds and test AABB AABS accordingly....
On Thu, Jan 20, 2011 at 12:51 PM, Darcey Lloyd <[email protected]>wrote: > Very basic collision detection example and source 1: > > http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=4&subindex=8&aid=130 > > Very basic collision detection example and source 2: > > http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=4&subindex=8&aid=131 > > > > > <http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=4&subindex=8&aid=130> > > On 20 January 2011 10:39, amigo <[email protected]> wrote: > >> done thanks a lot >> >> >> On Jan 20, 10:06 am, John Brookes <[email protected]> wrote: >> > Simple answer is, it works. >> > >> > Trace out >> > trace(plane.distanceTo(cube)) >> > If nothing traces its something else in your code. >> > >> > You do understand the distance is calculated from the centers of the >> cube >> > and plane. >> > > -- Michael Ivanov ,Programmer Neurotech Solutions Ltd. Flex|Air |3D|Unity| www.neurotechresearch.com http://blog.alladvanced.net Tel:054-4962254 [email protected] [email protected]
