소스 검색

Address Wireframe position

sebavan 6 년 전
부모
커밋
f32970ee60
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      inspector/src/components/actionTabs/tabs/propertyGrids/meshes/meshPropertyGridComponent.tsx

+ 8 - 1
inspector/src/components/actionTabs/tabs/propertyGrids/meshes/meshPropertyGridComponent.tsx

@@ -59,8 +59,15 @@ export class MeshPropertyGridComponent extends React.Component<IMeshPropertyGrid
 
         var wireframeOver = mesh.clone();
         wireframeOver.reservedDataStore = { hidden: true };
+
+        // Sets up the mesh to be attached to the parent.
+        // So all neutral in local space.
+        wireframeOver.parent = mesh;
         wireframeOver.position = Vector3.Zero();
-        wireframeOver.setParent(mesh);
+        wireframeOver.scaling = new Vector3(1, 1, 1);
+        wireframeOver.rotation = Vector3.Zero();
+        wireframeOver.rotationQuaternion = null;
+
         var material = new StandardMaterial("wireframeOver", scene);
         material.reservedDataStore = { hidden: true };
         wireframeOver.material = material;