Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


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: 1328

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: 2799

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