BodyOrientation, Orientation..?

Topics: Developer Forum, Project Management Forum, User Forum
Feb 13, 2007 at 8:47 PM
Edited Feb 13, 2007 at 9:33 PM
Note: Sorry for cross posting across different forums. Know this doesn't fit in with some, but can't change that in edit.

Hey all - been having more luck with my game, but now on to a new problem:

I've got no intersection on my polygons, they move more or less correctly across other objects...

But.

On a slope, when I do this:

Matrix pos = Matrix.CreateTranslation(Unproject(rigidbodyobj.Position));
myBasicEffect.World = pos;

The object does not orient to the shape of the slope.

However, when I apply the rigid body's BodyRotationMatrix to the position:

Matrix pos = Matrix.CreateTranslation(Unproject(rigidbodyobj.Position));
myBasicEffect.World = myrigidbodyobj.BodyRotationMatrix * pos;

I get very odd rotation of my object. Assuming that the rotation described by BodyRotationMatrix is valid for a rotation around the Z-axis ( which is all I want ), I don't need to do any transformation to it to apply it to the translated object position when setting my draw position do I? Or am I missing something...?



.ns.