OrientationMatrix does not update when Orientation is set?!
Posted: Sun May 22, 2011 1:30 am
If I set the 'Orientation' property of an entity then the OrientationMatrix doesn't update immediately:
Result:
This makes things like boids and AI rather difficult to implement with the current version of the physics engine 
Code: Select all
entity.Orientation = Quaternion.CreateFromRotationMatrix(MathTools.RotationFrom(Vector3.UnitX));
Console.WriteLine(entity.Orientation);
Console.WriteLine(entity.OrientationMatrix.Forward);
entity.Orientation = Quaternion.CreateFromRotationMatrix(MathTools.RotationFrom(Vector3.UnitY));
Console.WriteLine(entity.Orientation);
Console.WriteLine(entity.OrientationMatrix.Forward);
Code: Select all
{X:0 Y:0 Z:0 W:0.9999999} // Orientation
{X:0 Y:0 Z:-1} // Orientation Matrix
{X:0 Y:0 Z:0.9999999 W:0} // Orientation
{X:0 Y:0 Z:-1} // Orientation Matrix
