SHOW:
|
|
- or go back to the newest paste.
1 | local function touchFunkx(event) | |
2 | local xDistance, yDistance = event.x - event.xStart, event.y - event.yStart | |
3 | ||
4 | if event.phase == "ended" then | |
5 | local distance = math.sqrt(xDistance * xDistance + yDistance * yDistance) | |
6 | local angle = (math.atan2(yDistance, xDistance) * 180 / math.pi + 45) % 360 | |
7 | end | |
8 | end |