Merge pull request #402 from MeFisto94/Issue373

Fixes #373 - Faulty Loggings of a SphereCollissionShape when using na…
experimental
Kirill Vainer 9 years ago
commit c39788d4fa
  1. 4
      jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SphereCollisionShape.java

@ -82,8 +82,10 @@ public class SphereCollisionShape extends CollisionShape {
*/ */
@Override @Override
public void setScale(Vector3f scale) { public void setScale(Vector3f scale) {
if (!scale.equals(Vector3f.UNIT_XYZ)) {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "SphereCollisionShape cannot be scaled"); Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "SphereCollisionShape cannot be scaled");
} }
}
protected void createShape() { protected void createShape() {
objectId = createShape(radius); objectId = createShape(radius);
@ -91,7 +93,7 @@ public class SphereCollisionShape extends CollisionShape {
// new SphereShape(radius); // new SphereShape(radius);
// objectId.setLocalScaling(Converter.convert(getScale())); // objectId.setLocalScaling(Converter.convert(getScale()));
// objectId.setMargin(margin); // objectId.setMargin(margin);
setScale(scale); setScale(scale); // Set the scale to 1
setMargin(margin); setMargin(margin);
} }

Loading…
Cancel
Save