浏览代码

Change the default editor camera rotation to position it in +X +Y +Z

(cherry picked from commit 6c2df6792b59fa6b84f99239797d1d54c8ded764)
Aaron Franke 5 年之前
父节点
当前提交
0b6a410890
共有 2 个文件被更改,包括 4 次插入6 次删除
  1. 1 5
      editor/plugins/spatial_editor_plugin.cpp
  2. 3 1
      editor/plugins/spatial_editor_plugin.h

+ 1 - 5
editor/plugins/spatial_editor_plugin.cpp

@@ -3407,11 +3407,7 @@ void SpatialEditorViewport::reset() {
 	last_message = "";
 	name = "";
 
-	cursor.x_rot = 0.5;
-	cursor.y_rot = 0.5;
-	cursor.distance = 4;
-	cursor.region_select = false;
-	cursor.pos = Vector3();
+	cursor = Cursor();
 	_update_name();
 }
 

+ 3 - 1
editor/plugins/spatial_editor_plugin.h

@@ -375,7 +375,9 @@ private:
 		Point2 region_begin, region_end;
 
 		Cursor() {
-			x_rot = y_rot = 0.5;
+			// These rotations place the camera in +X +Y +Z, aka south east, facing north west.
+			x_rot = 0.5;
+			y_rot = -0.5;
 			distance = 4;
 			region_select = false;
 		}