소스 검색

Bugfix: issue #631 (MeshCollisionShape constructor requires a triangle mesh) in trunk

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11095 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
sgold 11 년 전
부모
커밋
bff90dc9ee
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java

+ 1 - 1
engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java

@@ -210,7 +210,7 @@ public class CollisionShapeFactory {
     private static MeshCollisionShape createSingleMeshShape(Geometry geom, Spatial parent) {
         Mesh mesh = geom.getMesh();
         Transform trans = getTransform(geom, parent);
-        if (mesh != null) {
+        if (mesh != null && mesh.getMode() == Mesh.Mode.Triangles) {
             MeshCollisionShape mColl = new MeshCollisionShape(mesh);
             mColl.setScale(trans.getScale());
             return mColl;