Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


DX9 Billboarding

This topic is 5262 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone show exactly how to do a simple billboard by combineing the view matrix with the world matrix. I tried doing this in the past and I had a kinda bad result, it binded the stuff to the view matrix. I didn''t really want because I was using rain and when you moved the camera and looked up you could see the rain falling as it fell across the screen top to bottom but think about it your originally facing forward and it looks fine you look up and it still looks the same? I don''t think that looks to good, its raining horizonally. So if anyone could give me a simple example or explaination id be greatful. I just heard you can some how combine the view matrix with the world matrix therefore I wouldn''t have to rotate the objects based on the cameras angles. I just never could figure it out.

Share this post

Link to post
Share on other sites
I would have thought you would get the same result as what you have already by combining the view matrix and the world matrix.

I think what you really wanna do is have your sprite vertical... and then only rotate around the vertical axis, that should be pretty straight forward... say you have your vertical axis as the z axis...

and you have a camera direction vector of (x, y, z), and your sprite is originally in the x-y plane,

then the angle you need to rotate your sprite by is something like

angle = atan2(y, x);

and the axis of rotation will be (0, 0, 1)...

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!