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(); }
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(); }
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(); }