Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

3D Vector Math Equations

Avatar of Javin007
Javin007Flag for United States of America asked on
Game ProgrammingMath / Science
16 Comments1 Solution1150 ViewsLast Modified:
Should be a simple 500 points for the geometry geeks in here.  

I have a point located at a vector in 3D space.  (X,Y,Z)
I have a "direction" for that vector kept in degrees/radians another vector (A,B,C)
I have a second point located in the distance (D,E,F)

I need the formulas to do the following:

1.) What is the distance between XYZ & DEF?
2.) What is the find the "angle" between XYZ and DEF (and thus define ABC so that XYZ is facing DEF).
3.) What is the formula to "move" the point XYZ "forward" a set amount (N) based on it's current "direction" (ABC)?

These aren't for school.  I'm trying to do a simple 3D game, and sucked at Geometry 15 years ago.  More will no doubt follow.

-Javin