Original Post
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?