Jump to content
  • Advertisement
Sign in to follow this  
Annoyed

[DX10] Rotation matrix construction issues.

This topic is 3067 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 rendering a sphere with the usual rotation, scaling and translation. It is not that I don't understand rotation but apparently not enough. I want to place a flat object, say a disk on any given vertex and want it to be aligned such that the vertex normal is perpendicular to it's surface. I have managed to position the disk regardless of the spheres position/scale and/or rotation. but I can't get the rotation of the disk right. So what I'm looking for is how to construct a rotation matrix for my disk. I have looked into billboarding and I understand that this is a similar situation but somehow I am still unable to apply it. Any hints are appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Annoyed
I rendering a sphere with the usual rotation, scaling and translation.
It is not that I don't understand rotation but apparently not enough.

I want to place a flat object, say a disk on any given vertex and want it to be aligned such that the vertex normal is perpendicular to it's surface.

I have managed to position the disk regardless of the spheres position/scale and/or rotation. but I can't get the rotation of the disk right.

So what I'm looking for is how to construct a rotation matrix for my disk.
I have looked into billboarding and I understand that this is a similar situation but somehow I am still unable to apply it.

Any hints are appreciated.
This gets discussed a lot here - try searching the forum archives for 'align to normal' or 'align to vector', and you should be able to find some good explanations and code examples.

If that doesn't clear things up, perhaps you could describe what you've tried so far and where you're getting hung up.

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.

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!