Ver Fonte

fix for issue #917

Stephen Gold há 7 anos atrás
pai
commit
02ec12e454

+ 1 - 0
jme3-bullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java

@@ -297,6 +297,7 @@ public class HingeJoint extends PhysicsJoint {
     protected void createJoint() {
         objectId = createJoint(nodeA.getObjectId(), nodeB.getObjectId(), pivotA, axisA, pivotB, axisB);
         Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Joint {0}", Long.toHexString(objectId));
+        setAngularOnly(objectId, angularOnly);
     }
 
     private native long createJoint(long objectIdA, long objectIdB, Vector3f pivotA, Vector3f axisA, Vector3f pivotB, Vector3f axisB);

+ 1 - 0
jme3-jbullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java

@@ -172,5 +172,6 @@ public class HingeJoint extends PhysicsJoint {
         constraint = new HingeConstraint(nodeA.getObjectId(), nodeB.getObjectId(),
                 Converter.convert(pivotA), Converter.convert(pivotB),
                 Converter.convert(axisA), Converter.convert(axisB));
+        ((HingeConstraint) constraint).setAngularOnly(angularOnly);
     }
 }