Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

what does .unit do for vectors?

what does .unit do for vectors?

1 answer

Very simply, it changes the Vector3's magnitude to 1, without changing the angle.

3 comments

0

With 'magnitude' meaning the length or size, if you didn't know, block.

0

why would it be important to change magnitude to 1:o

0

For when you only care about the direction, mainly. It's a normalization, meaning you can multiply the resulting vector by a new length and it will just work, rather than having to find some ratio to multiply by to get from the existing length to the new one. Here's a short paper on why its useful in more 'pure' math: http://www.anselm.edu/internet/physics/cbphysics/downloadsi/unitvectors.pdf

This discussion is preserved as it was. New answers, comments, and votes are closed.