Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2/22/11
#1
  • Scripts inside tools no longer run unless the tool is owned by a player
  • Fixed a bug where old script threads wouldn't go away after the script finished
  • Added some new functions and properties for Vec2Ds

[lua]
vec2D.length
vec2D.normalized --returns a unit vector (divide by the length)
vec2D:add(vec2D)
vec2DConfusedub(vec2D)
vec2D:mul(vec2D) --multiply
vec2D:mul(number)
vec2D:div(vec2D) --divide
vec2D:div(number)
[/lua]

These functions return a copy, they do not change the original. For example, here is how to find the distance between two parts.

[lua]distance = part2.PositionConfusedub(part1.Position).length[/lua]
Reply


Messages In This Thread
2/22/11 - by Jacob__mybb_import1 - 02-22-2011, 10:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)