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

Acos vs Atan2? Which is better for finding angle between two Vectors?

Asked by 6 years ago

So i'm trying to apply trig/calc now to game development...

I'm confused about the difference between acos and atan2 when finding the angle between two vectors

Example

local theta = math.acos(a.Unit:Dot(b.Unit))

0
cos ? = a·b / |a|·|b| ... Is that for just two vectors starting from the same point? What about the angle between two distance point vectors? ASavageAF 0 — 6y
0
Gun Example = math.atan2(targetY-gunY, targetX-gunX) -- I wrote that assuming an answer to my question about two points? anyone here good with math.. ASavageAF 0 — 6y

Answer this question