alestane icon

Swipe movement (evaluate)

alestane | PRO | 01/02/14 02:57:54 PM UTC | 0 ⭐ | 322 👁️ | Never ⏰ | []
Lua |

430 B

|

None

|

0 👍

/

0 👎

    local function touchFunkx(event)
        local xDistance, yDistance = event.x - event.xStart, event.y - event.yStart
 
        if event.phase == "ended" then
            local distance = math.sqrt(xDistance * xDistance + yDistance * yDistance)
            local angle = (math.atan2(yDistance, xDistance) * 180 / math.pi + 45) % 360
            local dX, dY = 0, 0
            if angle < 90 then
            elseif angle < 180 then
            elseif angle < 270 then
            else
            end
        end
    end

Comments