private void p1_MouseMove(object sender, MouseEventArgs e)
{
if (MoveWASD)
{
float w = e.X / (float)p1.Width;
DirectXGlobal.Cam.dir = Microsoft.DirectX.Vector3.Normalize(
new Microsoft.DirectX.Vector3(
(float)(Math.Cos(w * 3.1415f * 2f)),
(float)(Math.Sin(w * 3.1415f * 2f)),
(e.Y / (float)p1.Height) * -2 + 1
)
);
}
}