Jump to content

  • Log In with Google      Sign In   
  • Create Account


Using D3DXMatrixLookAtLH for billboarding


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
1 reply to this topic

#1 george7378   Members   -  Reputation: 1185

Like
0Likes
Like

Posted 06 April 2013 - 01:21 PM

Is it possible to create a look-at matrix to force an object to always face the camera? At the moment I'm having to rotate my billboard plane in 3 dimensions using dot products and matrices to find angles, etc... but it would be nicer if I could use a matrix like this to do it for me. Is it possible? Thanks!



Sponsor:

#2 belfegor   Crossbones+   -  Reputation: 2554

Like
0Likes
Like

Posted 06 April 2013 - 02:04 PM

Just use inverse of view matrix and alter position of a billboard

D3DXMatrixInverse(&billboardWorldMat, NULL, &camViewMat);
billboardWorldMat._41 = myBillboardX;
billboardWorldMat._42 = myBillboardY;
billboardWorldMat._43 = myBillboardZ;
 





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