datsexyanon

Untitled

May 3rd, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function donut2(Vp, Vd, r, littleangle) --Returns the position for the create to be spawned at
  2.     --Vp is the position on the circle
  3.     --Vd is the direction vector
  4.     --r is the radius of the donut spirals
  5.     --littleangle is the position on those little spirals, should be apparent
  6.     Vd:setlength(1)
  7.     local x
  8.     local y
  9.     local z
  10.     y = r * sin(littleangle) --Vertical
  11.     x = Vd.x cos(littleangle) --Horizontal
  12.     z = Vd.z cos(littleangle) --Horizontal
  13.     Vp.set(Vp.x + x, Vp.y + y, Vp.z + z)
  14.     return Vp
  15. end
Advertisement
Add Comment
Please, Sign In to add comment