Advertisement

Question about vectors and angles

Started by February 03, 2003 05:29 AM
5 comments, last by PurpleAmethyst 22 years ago
If I have 3 angles of rotation for x, y and z, is it possible to construct a vector from thes using sin and cos. I need this for camera movement.
Just an advice: It might be a good idea for you to study some elementary linear algebra before you go on with your camera movement.

A rotation is a transformation that transforms one set of vectors to another. Thus, it is a relation between vectors, and in no way the same as a vector. Therefore it''s hard to understand what you mean when you say you want to construct a vector from a rotation.
Advertisement
Okay, i know that may have sounded a bit strange.
Heres what im trying to do in 2D.

     Y    V(don't know this)     |   /     |  /     | /     |/-----O-----X     |     |     |     | 


I know the angle XOV, and I need to work out V. I do this using sin and cos, that much works. I want to know how to do this in 3D. I've tried all this matrix stuff all weekend and could get it to work. I can move forward & backwards in XZ and look in all 6 directions, but can't move up r down in y.


[edited by grhodes_at_work to add the "code" tags]

[edited by - grhodes_at_work on February 3, 2003 6:29:45 PM]
hi
read about camera matrix > there are sins and coss of yours rotations

then multiply one-vector and this matrix

c''ya
Try starting here...

Rotation
<span class="smallfont">That is not dead which can eternal lieAnd with strange aeons even death may die.   -- "The Nameless City" - H. P. Lovecraft</span>
Use the tags when doing ASCII art.<br><br>And yes, your problem can be solved. Look up spherical coordinates.<br><br>Cédric
Advertisement
Thanks for your help have it working now :-).

This topic is closed to new replies.

Advertisement