浏览代码

Fixed null exception when toggling orthographic camera in UI element selection mode. Updated editor documentation.

Lasse Öörni 12 年之前
父节点
当前提交
592f0db8ce
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 5 5
      Bin/Data/Scripts/Editor/EditorView.as
  2. 1 0
      Docs/GettingStarted.dox

+ 5 - 5
Bin/Data/Scripts/Editor/EditorView.as

@@ -1224,7 +1224,7 @@ void ViewRaycast(bool mouseClick)
         float(pos.y - view.top) / view.height);
     Component@ selectedComponent;
 
-    if (pickMode != PICK_RIGIDBODIES)
+    if (pickMode < PICK_RIGIDBODIES)
     {
         if (editorScene.octree is null)
             return;
@@ -1380,7 +1380,7 @@ Vector3 SelectedNodesCenterPoint()
 }
 
 Vector3 GetScreenCollision(IntVector2 pos)
-{  
+{
     Ray cameraRay = camera.GetScreenRay(float(pos.x) / activeViewport.viewport.rect.width, float(pos.y) / activeViewport.viewport.rect.height);
     Vector3 res = cameraNode.position + cameraRay.direction * Vector3(0, 0, newNodeDistance);
 
@@ -1391,19 +1391,19 @@ Vector3 GetScreenCollision(IntVector2 pos)
             editorScene.physicsWorld.UpdateCollisions();
 
         PhysicsRaycastResult result = editorScene.physicsWorld.RaycastSingle(cameraRay, camera.farClip);
-        
+
         if (result.body !is null)
         {
             physicsFound = true;
             result.position;
         }
-    } 
+    }
 
     if (editorScene.octree is null)
         return res;
 
     RayQueryResult result = editorScene.octree.RaycastSingle(cameraRay, RAY_TRIANGLE, camera.farClip,
-        pickModeDrawableFlags[pickMode], 0x7fffffff);
+        DRAWABLE_GEOMETRY, 0x7fffffff);
 
     if (result.drawable !is null)
     {

+ 1 - 0
Docs/GettingStarted.dox

@@ -499,6 +499,7 @@ E               - Ascend
 Q               - Descend
 Shift+E,Q       - Ascend or descend faster
 
+Numpad5         - Toggle orthographic / perspective camera
 Numpad1         - Front view
 Numpad3         - Right hand view
 Numpad7         - Top view