It looks like you're new here. If you want to get involved, click one of these buttons!
vecAngle = function(startX, startY, targetX, targetY) local xdiff = targetX - startX local ydiff = targetY - startY local ang = math.atan2( ydiff, xdiff ) ang = math.deg(ang) + 90.0 if ang < 0 then ang = 360.0 + ang end return ang end |
Comments