Advertisement

Vector hell!

Started by August 12, 2013 06:09 PM
2 comments, last by Mussi 11 years, 6 months ago

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.

Y - X

Advertisement
You should check out the youtube videos of BSVINO rodriguez (there are a few of them linked under articles, math)

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

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.

This topic is closed to new replies.

Advertisement