Jump to content
  • Advertisement
Sign in to follow this  
Ecoste

Vector hell!

This topic is 1833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, this is the first time using Vectors, and I don't get the math behind them. 

 

Here's my situation(3d Space):

Vector X

Vector Y

 

I want to get a third vector that goes from Vector X to Vector Y, and then I can just scale it myself. Halp.

Share this post


Link to post
Share on other sites
Advertisement
You should check out the youtube videos of BSVINO rodriguez (there are a few of them linked under articles, math)

Share this post


Link to post
Share on other sites

Y - X

Normalize the result so that you can scale it to a precise length afterwards. You can normalize a vector by dividing each component by the length of the vector. You can calculate the length of a vector as follows: sqrt(x*x + y*y + z*z), where x, y and z are the vector's components.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!