Exemplo n.º 1
0
        public void ResetCamera()
        {
            if (scn.Count > 0)
            {
                camera.Position    = MGConverter.ToVector3(scn[0].header.startGrid[0].Position);
                lowcamera.Position = camera.Position;

                camera.SetRotation((float)(scn[0].header.startGrid[0].Angle.Y / 1024 * Math.PI * 2), scn[0].header.startGrid[0].Angle.X / 1024);
                lowcamera.SetRotation((float)(scn[0].header.startGrid[0].Angle.Y / 1024 * Math.PI * 2), scn[0].header.startGrid[0].Angle.X / 1024);
                skycamera.SetRotation((float)(scn[0].header.startGrid[0].Angle.Y / 1024 * Math.PI * 2), scn[0].header.startGrid[0].Angle.X / 1024);

                Console.WriteLine(scn[0].header.startGrid[0].Angle.ToString());
            }
        }
Exemplo n.º 2
0
        public void ResetCamera()
        {
            if (scn.Count > 0)
            {
                camera.Position      = MGConverter.ToVector3(scn[0].header.startGrid[0].Position, 0.01f);
                rightCamera.Position = camera.Position;
                leftCamera.Position  = camera.Position;

                camera.SetRotation((float)(scn[0].header.startGrid[0].Angle.X / 4096f * Math.PI * 2), (float)(scn[0].header.startGrid[0].Angle.Z / 4096 * Math.PI * 2));
                rightCamera.SetRotation((float)(scn[0].header.startGrid[0].Angle.X / 4096f * Math.PI * 2), (float)(scn[0].header.startGrid[0].Angle.Z / 4096 * Math.PI * 2));
                leftCamera.SetRotation((float)(scn[0].header.startGrid[0].Angle.X / 4096f * Math.PI * 2), (float)(scn[0].header.startGrid[0].Angle.Z / 4096 * Math.PI * 2));
                skycamera.SetRotation((float)(scn[0].header.startGrid[0].Angle.X / 4096f * Math.PI * 2), (float)(scn[0].header.startGrid[0].Angle.Z / 4096 * Math.PI * 2));

                UpdateCameras(new GameTime());

                Console.WriteLine(scn[0].header.startGrid[0].Angle.ToString());
            }
        }