My knowledge on vectors is minimal. Help on the math and whether my thinking is correct is very appreciated.
Let’s assume we have the following:
start(1,1,1)
vectordirection(?,?,?)
vectorend(?,?,?)
vectordistance
betweenstart()
-end()
Some details:
- The
direction()
vector is the mouse and constantly moving so I have to calculate it first. - The
end()
vector is always betweenstart()
anddirection()
on the same line.
So to calculate end()
, I need:
- the direction between
start()
anddirection()
- then add the distance to the
start()
vector based on thedirection()
Possible solution I have in my mind
To get the direction, I need to
direction().subtract(start())
And then normalize()
the result?
But how do I add the distance based on the new unit vector?
Sorry if I got the terminology wrong. Is this book Amazon.co.uk the right one to better understand the math?
@JohnK your help is very appreciated!