It looks like you're new here. If you want to get involved, click one of these buttons!

- 7.7K All Categories
- 10 Help with translations
- 4.2K General questions
- 106 Roadmap
- 348 Game & application design
- 306 Plugins
- 69 User experience
- 74 Marketplace
- 287 Code snippets
- 34 Building a team?
- 267 Suggestions & requests
- 350 Announce your apps made with Gideros.
- 90 Step by step tutorials
- 639 Bugs and issues
- 195 Introduce yourself
- 219 Announcements
- 103 Forum talk
- 400 Relax cafe

MikeHart
Guru

Hi folks,

this snipped will calculate the distance in pixel of two given vector coordinates:

this snipped will calculate the distance in pixel of two given vector coordinates:

local vecDist = function(x, y, tx, ty) --Calculate the distance between 2 vectors local xdiff = x - tx local ydiff = y - ty local dist = (xdiff*xdiff+ydiff*ydiff)^0.5 return dist end |

Likes: gorkem

+1 -1 (+1 / -0 )Share on Facebook

## Comments