Skip to main content
GameDev.net gamedev.net
🔒 Locked

vectors

Started by kudi Nov 17, 2000 at 9:05 AM 1 replies 450+ views
Original Post
kudi
kudi
Hello, I have a vector v(x,y,z) that I transform with the angles a,b,c and the result vector is v''(x'',y'',z''). Thats not difficult, but I would like to know how I can get the a,b,c values when I have the vectors v(x,y,z) and v''(x'',y'',z'')? I know that is boring math, but it would really help me.
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
Friday13
Friday13
Well, in static basis, only 2 succesive turns are sufficient to transition from one vector to another:

in XY_plane: alpha=ATAN(V1.y/V1.x)-ATAN(V2.y/V2.x)
in XZ_plane: beta=ATAN(V1.z/V1.x)-ATAN(V2.z/V2.x)

However, if it''s roll, pitch and yaw (i.e., ''own'' rotations around some local basis that rotates with the object) that you want, or you just turn the vector succesively around world''s x-axis, y-axis, z-axis, I believe there''s no straightforward solution ''cos there''s a zillion of turn combinations that lead to the same position.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.