Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  

hlsl spherical billboard y rotation? math question

This topic is 2072 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'm implementing a spherical billboard system for overhead views.  When the camera is directly overhead I don't want the billboard to rotate on it's Y axis but instead want to assign an arbitrary y rotation to the billboard, for example trees with varying y axis rotations.  


I'm forcing the billboard to face upward with these statements:  


sideVector=float3(1,0,0) //right
upVector=float3(0,0,-1)   //forward
How do I rotate this an x amount on the Y axis?  

Share this post

Link to post
Share on other sites
sideVector=cross(float3(0,1,0), -input.rotation);
does the trick, up facing billboard with rotation
Edited by danromeo

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!