It looks like you're new here. If you want to get involved, click one of these buttons!
collCheck_Circle2C = function( source, target ) local xf = source:getX() - target:getX() xf = xf * xf local yf = source:getY() - target:getY() yf = yf * yf local ssx, ssy = source:getScale() local tsx, tsy = target:getScale() local rf = (source.radius*ssx) + (target.radius*tsx) rf = rf * rf if (xf+yf) < rf then return true end return false end |
Comments