Browse Source

Fix typo. Ensure new node positioning uses world position in case the new node is parented.

Lasse Öörni 10 years ago
parent
commit
ffa0b96e85

+ 1 - 2
bin/Data/Scripts/Editor/EditorScene.as

@@ -293,8 +293,7 @@ Node@ CreateNode(CreateMode mode)
         newNode = editNode.CreateChild("", mode);
     else
         newNode = editorScene.CreateChild("", mode);
-    // Set the new node a certain distance from the camera
-    newNode.position = GetNewNodePosition();
+    newNode.worldPosition = GetNewNodePosition();
 
     // Create an undo action for the create
     CreateNodeAction action;

+ 1 - 1
bin/Data/Scripts/Editor/EditorView.as

@@ -1656,7 +1656,7 @@ Vector3 GetNewNodePosition()
         if (GetSpawnPosition(cameraRay, camera.farClip, position, normal, 0, false))
             return position;
     }
-    return cameraNode.position + cameraNode.worldRotation * Vector3(0, 0, newNodeDistance);
+    return cameraNode.worldPosition + cameraNode.worldRotation * Vector3(0, 0, newNodeDistance);
 }
 
 int GetShadowResolution()

+ 1 - 1
bin/Data/UI/EditorSettingsDialog.xml

@@ -135,7 +135,7 @@
                                             <attribute name="Text" value="In center" />
                                         </element>
                                         <element type="Text" style="FileSelectorFilterText">
-                                            <attribute name="Text" value="Reycast" />
+                                            <attribute name="Text" value="Raycast" />
                                         </element>
                                     </element>
                                 </element>