what side of a line is my vector on?

Started by
0 comments, last by ViperDigital 21 years, 9 months ago
Hey everyone, given a right vector and a forward vector and a velocity vector, how can i tell if my velocity vector lays on the same side as the forward vector or other side (side meaning split between the right vector) this is for 3-dim space velocity vec not same side (-1) ..\...| ...\..|../ velocity vector is on same side (1) ....\.|./ .....\|/ ......|-------> forward vector ......| ......| ......V right vector plane (really an imaginary 2d plane that is perpendicular to the forward vector) Im doing this to find out if my speed is positive or negative. Thanks to anyone who can help! Sincerely, Scott
Advertisement
just do a dot product with the forward vector. if it''s negative, you''re going backwards. if it''s positive, you''re going forward.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k

This topic is closed to new replies.

Advertisement