소스 검색

Physics parsing

Thou deprecated, this should still be included in the mesh's Parse
method.
Raanan Weber 9 년 전
부모
커밋
460c21cc3a
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      src/Mesh/babylon.mesh.ts

+ 10 - 0
src/Mesh/babylon.mesh.ts

@@ -1765,6 +1765,16 @@
             } else {
                 mesh.layerMask = 0x0FFFFFFF;
             }
+            
+             
+            //(Deprecated) physics
+            if(parsedMesh.physicsImpostor) {
+                mesh.physicsImpostor = new BABYLON.PhysicsImpostor(mesh, parsedMesh.physicsImpostor, {
+                    mass: parsedMesh.physicsMass,
+                    friction: parsedMesh.physicsFriction,
+                    restitution: parsedMesh.physicsRestitution
+                }, scene);
+            }
 
             // Instances
             if (parsedMesh.instances) {