Jump to content
  • Advertisement
Sign in to follow this  
Squirell

Billboard Rotation Help

This topic is 5470 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

I have a billboard representing a laser beam (or something similar). I have a fixed orgin for it and a fixed direction. I can get this all to render just fine. However, I need to rotate of course so it doesnt end up being side on. I was thinking of using D3DX to rotate around an arbitary axis (defined by the fixed direction) and use that as the world transform. What I need to know is how to calculate the amount to rotate by, or is there a better way to do this?

Share this post


Link to post
Share on other sites
Advertisement
I presume you are asking how to rotate the billboard to always face the camera. If so then use the inverse of the view matrix and set _41,_42 and _43 of the matrix to the position of the billboard.

Share this post


Link to post
Share on other sites
Yeah I thought about that but wouldn't that rotate the orgin point or change the direction? I only want rotation around the direction axis and wouldn't that rotate everything (changing the direction axis)?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you should use constructed cylinders with maybe 5-6 sides, trying to billboard something like that too appear 3D is too frustrating to get just right.

Share this post


Link to post
Share on other sites
Yes Trip99 I did try your method and even though it normally works for billboards it doesn't for me because these beams are hanging around for a while and when I move around it changes the direction of the beam...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!