Example #1
0
 private void btnFreeFlight_Click(object sender, EventArgs e)
 {
     if (!freeFlightActive)
     {
         LS.EvaluateLua(@"
             gvCamera.DefaultFlag = 0;
             Camera.ScrollUpdateZMode(3);
             Display.SetFarClipPlaneMinAndMax(1000000, 0);
             Camera.ZoomSetDistance(0);
             Game.GUIActivate(0);
             Camera.RotSetFlipBack(0);
             Camera.SetControlMode(1);
             Display.SetRenderSky(1);
         ");
         Camera       = S5CameraInfo.GetCurrentCamera();
         Camera.PosZ += 4000;
         Camera.WriteToMemory();
         tmrUpdateCamera.Start();
         joyStickCutsceneEditor.Enabled = true;
     }
     else
     {
         LS.EvaluateLua(@"
             Camera_InitParams();
             Game.GUIActivate(1);
             Camera.SetControlMode(0);
         ");
         tmrUpdateCamera.Stop();
         joyStickCutsceneEditor.Enabled = false;
     }
     freeFlightActive = !freeFlightActive;
 }
        public FlightPoint(S5CameraInfo camera, int id)
        {
            ID             = id;
            LookAtPos      = new Waypoint(camera.Point3D.MoveBy((float)(camera.PitchAngle * Math.PI / 180), (float)(camera.YawAngle * Math.PI / 180), 1000));
            CamPos         = new Waypoint(camera.Point3D);
            LuaCallback    = "";
            Speed          = 800;
            SpeedUseOnlyXY = false;

            CamPitch = camera.PitchAngle;
            CamYaw   = camera.YawAngle;
        }