Przeglądaj źródła

Address Wireframe position

sebavan 6 lat temu
rodzic
commit
f32970ee60

+ 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;