Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. if getKeyState("mouse1") then
  2.             if #currentLine == 0 then
  3.                 table.insert(currentLine, {x, y, z})
  4.             else
  5.                 local xd = x - currentLine[#currentLine][1]
  6.                 local yd = y - currentLine[#currentLine][2]
  7.                 local zd = z - currentLine[#currentLine][3]
  8.                 local distance = math.sqrt(xd*xd + yd*yd + zd*zd)
  9.  
  10.                 if distance > 2 then
  11.                     table.insert(currentLine, {x, y, z+0.1})
  12.                 end
  13.             end
  14.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement