Intersect Point

Ender Nafi Elekcioglu endernafi at
Thu Oct 24 21:04:21 EDT 2013

I didn’t know Andre’s library; it sure will help me through the actual project.

I bought Animation Engine two years ago, but never used it actually.
Therefore I completely forgot how useful it could be.
I used two functions of it {*pointOnLine* and *distance*} and it works fine; no lags, at least for now :)
Thank you very much...

Now, my workflow is as follows:

_ if intersect(object1, object2, “opaque pixels”)
__ put the loc of object1 into tLoc1
__ put the loc of object2 into tLoc2
__ put pointOnLine(tLoc1, tLoc2, (distance(tLoc1, tLoc2) / 2)) into collisionPoint
__ set the loc of spriteButton to collisionPoint
__ send “animateTheExplosion” to me in 1 milliseconds
__ play explosionSound
__ delete object1
__ delete object2

Still, it would be more useful getting the collision point as the result of *intersect()* than a plain true-false;
I think I'll submit it as a feature request.


~ Ender Nafi

More information about the Use-livecode mailing list