Exemple #1
0
        public static Vector3 get_mouse_position()
        {
            Vector3 position          = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition).direction;
            Vector3 adjusted_position = SnapUtility.snap(position, false); // FIXME: BUG: HACK: TODO:

            return(adjusted_position);
        }
Exemple #2
0
 private void OnSceneGUI()
 {
     move_camera();
     center_camera_view();
     SnapUtility.draw_grid();
     if (EditorWindow.mouseOverWindow == SceneView.currentDrawingSceneView)
     {
         HandleUtility.AddDefaultControl(mouse_control);
         bool escape = Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Escape;
         capture_v_press();
         state_machine = state_machine(escape);
         use_mouse_event();
     }
     Repaint();
 }