Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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

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

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