Page 1 of 1

Math Math Math...

Posted: Tue Jan 10, 2012 9:44 pm
by Chris
Damn I hate mathematics and can't be bothered generating more hate by rereading the endless books I have on the topic. Would anyone happen to know how to turn a 3D vector into an angle (or two) in degrees? I found plenty of answers on 2D vectors and the sorts, which was rather easy using Math.Atan2, but the Math object in JavaScript doesn't come with anything ready-made for people like me :(

Re: Math Math Math...

Posted: Wed Jan 11, 2012 5:52 am
by Jackolantern
Are you talking about things like "Sine = opposite/hypoteneuse"? That should still work in a 3D space because you still have to get a measurement of the objects' sides, and where you take that measurement creates a 2D plane where the formula works. Now if the measurements on the sides you have to use don't line up into a 2D plane (and thus move off into the Z coordinate space), I have no clue.

Here are some links with more information, which may help:

BlitzBASIC forum post
from GameDev