- Home /
Uses of Vector3.Dot
I'd like to know examples of uses of this function. As far as i noticed for normalized vectors it works almost the same as Vector3.Angle, but it returns <-1,1> instead of <0, 180>. What are the other uses of Vector3.Dot?
Dot product is a standard math function, used in 2D/3D geometry, plus other things. It's no different from square root, Pow, Sin, Cos ... . If you want to, you can review your trig and learn about dot product in any non-Unity geometry reference.
Like all math, it's used when you have a formula that uses dot-product. If you never have one, don't use it. Have you ever used $$anonymous$$athf.nearestPowerOfTwo? Do you stay up late wondering why not?
In practice, most game developers have pretty weak trig, so LookAt, Angle ... do all the common trig for you. The fancy math stuff is for special cases.
Your answer
Follow this Question
Related Questions
Angle Between vectors in Navigation Mesh 1 Answer
Snapping to Object Forward Axis 0 Answers
Simple vector math help. 1 Answer
Transform angle to grid position 2 Answers