It looks like you're new here. If you want to get involved, click one of these buttons!
function Sprite:collidesWith(sprite2) local x,y,w,h = self:getBounds(stage) local x2,y2,w2,h2 = sprite2:getBounds(stage) return not ((y+h < y2) or (y > y2+h2) or (x > x2+w2) or (x+w < x2)) end if(circle1:collidesWith(circle2)) then print("yes"); end |
Comments
maybe method 2 is faster ?
even more faster if you use my native (C++) collision system (tnt collision) ...
Likes: ar2rsawseen
www.tntengine.com
Thanks man!
for device Player you need to "recompile" the Gideros Player (check docs under "installation" section for desktop and device compile)
anyway feel free to ask if you need help. (here or PM or gregbug at gmail . com)
(you send me an email by tntengine.com site?)
www.tntengine.com