Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SoaringTortoise

Rotation by vectors

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

Is it possible, and if so how, to create a world transform rotation matrix that is based on vectors? As in the view matrix where you specify a lookat, up and right vectors, I would like to do exactly the same thing with the world matrix. Possible, or not?

Share this post


Link to post
Share on other sites
Advertisement
If you have the object''s:
lookAt, right and up vectors
position (of its origin)

then the world matrix is (expand the vectors):
right    0
up 0
lookAt 0
position 1

Share this post


Link to post
Share on other sites
He means:

vector "right" -> Rx, Ry, Rz
vector "up" -> Ux, Uy, Uz
vector "lookAt" -> Lx, Ly, Lz
vector "position" -> Px, Py, Pz

then the matrix would be (in 4x4 matrix)


Rx Ry Rz 0
Ux Uy Uz 0
Lx Ly Lz 0
Px Py Pz 1


I don't know whether that works or not, that's just what he was saying.

[edited by - Nypyren on June 3, 2003 11:50:55 PM]

Share this post


Link to post
Share on other sites

  • 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!