From 23759820e51da4ee55da5e0593dd11cddadf52ed Mon Sep 17 00:00:00 2001 From: sgold Date: Thu, 20 Jun 2019 11:27:06 -0700 Subject: [PATCH] fix GImpact scaling in jme3-jbullet: issue #1120 --- .../bullet/collision/shapes/GImpactCollisionShape.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java b/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java index 5a7921fc0..8dfe2b2f6 100644 --- a/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java +++ b/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java @@ -125,9 +125,14 @@ public class GImpactCollisionShape extends CollisionShape{ TriangleIndexVertexArray tiv = new TriangleIndexVertexArray(numTriangles, triangleIndexBase, triangleIndexStride, numVertices, vertexBase, vertexStride); cShape = new GImpactMeshShape(tiv); cShape.setLocalScaling(Converter.convert(worldScale)); - ((GImpactMeshShape)cShape).updateBound(); cShape.setLocalScaling(Converter.convert(getScale())); cShape.setMargin(margin); + ((GImpactMeshShape) cShape).updateBound(); } + @Override + public void setScale(Vector3f scale) { + super.setScale(scale); + ((GImpactMeshShape) cShape).updateBound(); + } }