protected void ModelRotation(D3DXVECTOR2 pointB)
{
// Get new heading angle, for the given point.
var newHeading = HeadingToRad(AllEntities.Get2DPos(), pointB);
// Get new 3D matrix Y axis vector, rotated to the given angle.
var newVector = GetNewVector(newHeading);
// Set new heading
Funcs.SetHeading(EntityType.PCMob, 0, newHeading);
// Set new rotation vector.
Funcs.Set3DVector(EntityType.PCMob, Axis.X, 0, newVector.x);
Funcs.Set3DVector(EntityType.PCMob, Axis.Y, 0, newVector.y);
}