From 56558841e76600e0b3a3bba548c45750d8c5c645 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Mon, 20 Jun 2016 22:50:33 +0200 Subject: [PATCH] CylinderCollisionShape: don't print warning if scale = 1,1,1 --- .../jme3/bullet/collision/shapes/CylinderCollisionShape.java | 4 +++- .../jme3/bullet/collision/shapes/CylinderCollisionShape.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java index 35edb8449..4fe48f9b7 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java @@ -86,7 +86,9 @@ public class CylinderCollisionShape extends CollisionShape { */ @Override public void setScale(Vector3f scale) { - Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled"); + if (!scale.equals(Vector3f.UNIT_XYZ)) { + Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled"); + } } public void write(JmeExporter ex) throws IOException { diff --git a/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java b/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java index 1a33c97fe..a41974d00 100644 --- a/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java +++ b/jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java @@ -90,7 +90,9 @@ public class CylinderCollisionShape extends CollisionShape { */ @Override public void setScale(Vector3f scale) { - Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled"); + if (!scale.equals(Vector3f.UNIT_XYZ)) { + Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled"); + } } public void write(JmeExporter ex) throws IOException {