Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

what does .unit do for vectors?

Asked by 8 years ago

what does .unit do for vectors?

1 answer

Log in to vote
4
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
8 years ago

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

0
With 'magnitude' meaning the length or size, if you didn't know, block. Perci1 4988 — 8y
0
why would it be important to change magnitude to 1:o Blockeus 68 — 8y
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 adark 5487 — 8y
Ad

Answer this question