BatchNode and physics : Reverted previous change and made the batchNode batch geom to ignore physics.
see post http://jmonkeyengine.org/forum/topic/batchnode-breaks-createmeshshape/page/2/#post-200684 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10076 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2c9fe26913
commit
c6d659684e
@ -102,7 +102,7 @@ public class CollisionShapeFactory {
|
||||
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()),
|
||||
trans.getTranslation(),
|
||||
trans.getRotation().toRotationMatrix());
|
||||
} else if (spatial instanceof Geometry && !((Geometry)spatial).isBatched()) {
|
||||
} else if (spatial instanceof Geometry) {
|
||||
Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE);
|
||||
if (bool != null && bool.booleanValue()) {
|
||||
continue; // go to the next child in the loop
|
||||
|
@ -179,6 +179,7 @@ public class BatchNode extends Node implements Savable {
|
||||
//we set the batch geometries to ignore transforms to avoid transforms of parent nodes to be applied twice
|
||||
for (Batch batch : batches.getArray()) {
|
||||
batch.geometry.setIgnoreTransform(true);
|
||||
batch.geometry.setUserData(UserData.JME_PHYSICSIGNORE, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user