rotation prob

Started by
13 comments, last by turnpast 19 years, 1 month ago
Here is how it is at the moment. It sits in the right place, but its facing the wrong direction. I'd like to have the open section of the tent facing the opposite way, but I cant seem to get it to rotate that way. I am using the World matrix to handle scrolling by changing the xPos and yPos variables. hope I've made things clearer.Thanks again for the help.



using this code.

//to set position and rotation	tentMesh.setPos(xPos,yPos,0.0f);							tentMesh.rotate(0f /(float)Math.PI ,4.7f / (float)Math.PI, 0f / (float)Math.PI);							tentMesh.DrawMesh(ref device);//to draw        device.Transform.World = Matrix.RotationYawPitchRoll(angleX, angleY, angleZ) * Matrix.Translation(posX,posY,posZ);


[Edited by - dazscott on March 14, 2005 11:16:01 AM]
Advertisement
you linked the picture to your local hard drive... :)
[ King_DuckZ out-- ]
Ok, I cannot see your picture, but I can say this: Use the View matrix for scrolling and the world matrix for positioning. Trying to use just the world matrix to do everyting is going to lead to no end of troubles for you.
I fixed up the links to the images. any suggestions on how I can get the tent to face the opposite direction? when I increase the yaw rotation this happens.



pitch is set to 4.7f thats how I got it to face roof side up.
So how can I get it to rotate on the axis I want? thanks guys
code same as previous post.
I'm sorry, you are probably just going to have to play with it until you get it right. Are you sure that you mean 4.7/PI and not PI/4.7?

This topic is closed to new replies.

Advertisement