Recommended Posts

I have my view matrix and everything works fine, however I am trying to make it look behind. I hope I'm explaining this properly, but say you are driving your virtual car around and press the "A" button to look at the traffic behind/following you. That what I am trying to do, just a rear-view mirror look. Any ideas how I can take my current view matrix and change it so I can point it to the rear of the direction its currently facing?

Thank you.

0

Share this post

Link to post

Share on other sites

I have my view matrix and everything works fine, however I am trying to make it look behind. I hope I'm explaining this properly, but say you are driving your virtual car around and press the "A" button to look at the traffic behind/following you. That what I am trying to do, just a rear-view mirror look. Any ideas how I can take my current view matrix and change it so I can point it to the rear of the direction its currently facing?

Thank you.

I'm definately no expert on the matter but how about you do the following? ( given that ViewMatrix, EyeVector and UpVector are already defined globally )

Share this post

Link to post

Share on other sites

if so you can just minus the lookat position -(lookAt) flips the positions behind the cameras current pos, build a view mat from that and your current pos and up vector and your sorted
no need to build a rotation matrix and transform a position etc if thats the case