public override void UpdateProperties(EntityProperties entprop)
{
// Undo any center-of-mass displacement that might have been done.
if (PositionDisplacement != Vector3.Zero || OrientationDisplacement != Quaternion.Identity)
{
// Correct for any rotation around the center-of-mass
// TODO!!!
//entprop.Position = entprop.Position + (PositionDisplacement * entprop.Rotation);
// entprop.Rotation = something;
// The origional shape was offset from 'zero' by PositionDisplacement.
// These physical location must be back converted to be centered around the displaced
// root shape.
// Move the returned center-of-mass location to the root prim location.
Vector3 displacement = PositionDisplacement * entprop.Rotation;
Vector3 displacedPos = entprop.Position - displacement;
DetailLog("{0},BSPrimDisplaced.UpdateProperties,physPos={1},disp={2},simPos={3}",
LocalID, entprop.Position, displacement, displacedPos);
entprop.Position = displacedPos;
}
base.UpdateProperties(entprop);
}
}