Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tracking = {}
- function tracking.getClosest(contactList, PosX, PosY, PosZ)
- smlDist=1000000
- for iv, v in pairs(contactList) do
- i = string.sub(iv, 1)
- X = inList[i]
- Y = inList[i]
- Z = inList[i]
- dist = math.sqrt((X-PosX)^2+(Y-PosY)^2+(Z-PosZ)^2)
- if dist<smlDist then
- smlDist=dist
- smlI = i
- end
- end
- return smlI
- end
- return tracking
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement