Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Rotating object with camera rotation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 laylay   Members   -  Reputation: 198

Like
0Likes
Like

Posted 07 November 2012 - 06:39 AM

So I have a camera going along a track, I assumed I could just use this same matrix to rotate an object but it seems to rotate in strange directions.

I have a cart on a track, I have the camera rotating fine along it but I'm having trouble rotating the cart. Is camera rotation different somehow?
So failing that, I'm trying to construct a matrix using the tangent, normal and binormal of the track, same thing happens.

I'm plugging them vectors into the matrix rows mat(binormal, normal, tangent) and multiplying that with a rotation of (-90, 90, 0) because of the way the model is exported.

Where am I going wrong? I just want to rotate the cart on the track.



Edit:

And again I figure it out just after I post.. To fix I just transposed the matrix, is that the correct way to go about it?

Edited by laylay, 07 November 2012 - 07:00 AM.


Ad:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS