What are unit Vectors?

Started by
3 comments, last by Xeon_Boy 22 years, 9 months ago
What does the term "Unit Vector" mean? Also, can anyone roughyl explain to me the concept of "Cross Product" stuff? Thanks!!!!! "The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling when u perform an Air-Walk in the basketball court."
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone's watching in awe......."
Advertisement
a unit vector is simply a vector with a length of one...
ie... sqrt( (delta x)^2 + (delta y)^2 + (delta z)^2 ) = 1

look for a good tutorial on the net about vectors... flipcode.com has an entire series devoted to this type of stuff...

Edited by - lucid on July 7, 2001 9:02:14 AM
If you have two vectors, say u and v, that are not parallel, then they can determine a plane. For example, think of u=(1,0,0) and v=(0,1,0). Linear combinations of these 2 vectors generate the XY plane. The cross product of these 2 vectors is a vector that is perpendicular to the plane. You can determine its direction using the right hand rule.

Using i,j,k notation (where i=(1,0,0),j=(0,1,0) and k=(0,0,1)) the exact formula is:

if u=ai+bj+ck and v=di+ej+fk then

u x v = determinant( i j k
a b c
d e f)

= (bf-ce)i-(af-cd)j+(ae-bd)k

Thanks pal! Say, is Vectors used more in 2D or 3D games? Thanks!!!!! :-D

"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."
"The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone's watching in awe......."
Hey,

Vectors are used *more* in 3D games, but they can surely be used in 2D games as well.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement