예제 #1
0
        public void SampleNearCutoffFromCamera()
        {
            Undo.RegisterUndo(new UndoHistory.HistoryDecalsValues());

            float Dist = (int)CameraControler.GetCurrentZoom();

            HashSet <OzoneDecal> .Enumerator ListEnum = DecalsInfo.Current.SelectedDecals.GetEnumerator();
            while (ListEnum.MoveNext())
            {
                ListEnum.Current.NearCutOffLOD = Dist;
            }
            ListEnum.Dispose();
            UpdateSelection();
        }
예제 #2
0
        public void AlighCameraMarker()
        {
            if (Count <= 0)
            {
                return;
            }

            Undo.RegisterUndo(new UndoHistory.HistoryMarkersChange(), new UndoHistory.HistoryMarkersChange.MarkersChangeHistoryParameter(AllMarkers));

            SelectedGameObjects[0].GetComponent <MarkerObject>().Tr.position = CameraControler.Current.Pivot.localPosition;
            SelectedGameObjects[0].GetComponent <MarkerObject>().Owner.zoom  = CameraControler.GetCurrentZoom();


            Quaternion rot = Quaternion.LookRotation(-CameraControler.Current.Pivot.forward, CameraControler.Current.Pivot.up);

            //Quaternion rot = Quaternion.Euler(Vector3.up * 180) * CameraControler.Current.Pivot.localRotation * Quaternion.Euler(Vector3.right * 90);

            SelectedGameObjects[0].GetComponent <MarkerObject>().Tr.rotation = rot;

            SelectionManager.Current.FinishSelectionChange();
        }
예제 #3
0
        public void CreateFromView()
        {
            Place(new Vector3[] { CameraControler.Current.Pivot.localPosition }, new Quaternion[] { CameraControler.Current.Pivot.localRotation }, new Vector3[] { Vector3.one });
            int mc = 0;

            MapLuaParser.Current.SaveLuaFile.Data.MasterChains[mc].Markers[LastAddedMarkers[0]].zoom = CameraControler.GetCurrentZoom();
        }