Sign in to follow this  
laylay

Rotating object with camera rotation

Recommended Posts

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this