Jump to content
  • Advertisement
Sign in to follow this  
Mercenarey

Middle Vector

This topic is 5151 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

I wonder how I most easily find the middle vector between two other given vectors? I illustrated it with a l33t drawing of mine :) http://www.mercenaries.ws/midvector.gif If I got the two black vectors, how will I find the grey?

Share this post


Link to post
Share on other sites
Advertisement
For the direction (if the two original vectors are a and b and the one in the middle is c):
c = a + b.
This is because the resulting vector of an addition is the diagonal of the parallelogram formed by the vectors a and b.

Share this post


Link to post
Share on other sites
but won't it be alot longer?

If I add two unit vectors, the result of that addition will not be a unit vector. Lets say 0/1/0 and 1/0/0 for simplicity¨s sake, result will be 1/1/0, and it will then have to be normalized to get the right length.

Is there any way to get around the normalization (and its sqrt())?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
One thing to note is that the situation is ambiguous if the vectors are opposite to each other. For example for up and down facing vectors, you could choose left or right facing vector to be the between vector.

The only way to avoid normalization that I can think of is using spherical coordinates. But that would probably end up being a lot more computation unless you already have the vectors in spherical coords.

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!