Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Rotating object with camera rotation

4: Adsense

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   

310
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.





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.