• Advertisement
Sign in to follow this  

Basic question

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

This is a pretty basic question, but I can't seem to get it. I'm trying to get a world transform from a position and normal. I was using the following function, but it doesn't work when the normal is facing straight up or straight down: D3DXVECTOR3 Up(0.0f, 1.0f, 0.0f); D3DXMatrixLookAtLH(&World, &Position, &(Position - Normal), &Up); D3DXMatrixInverse(&World, NULL, &World); I could check if the normal is straight up or straight down and offset it, but is there another way to do this?

Share this post


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

  • Advertisement