02-22-2011, 10:56 PM
- 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)
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.Position
