PDA

View Full Version : PANIC! Vector to angle in dregrees!



Thomas M.
02-27-2009, 02:57 AM
I somehowmanage to get near the result by dividing the normalized vectors x and z component and feed the result into the ArcTan node. Problem is that from 90 on it just gets negative and counts back to zero. What do I need to do to get the full 360 correctly? Hopefully there's another way as transfering it back from Radians to Dregree is also annoying.

Cheers
Thomas

probiner
02-27-2009, 10:34 AM
What gets back to 0 the output ArcTan values?

I don't understand much of mathematics but seeing this Tangent function graphic might explain why that is happening

http://library.thinkquest.org/C0110248/geometry/graphics/trigfngraph3.jpg

Its a always rising graphic 0-90 (0->+infinite) 90-180 (-infinite->0) and so on.

Post the pipeline you got right now, it might help the experts to understand what you are trying to achive.

Good luck