Bläddra i källkod

Merge pull request #512 from riccardobl/pr200616

Removed warning if scale=1,1,1 in CylinderCollisionShape
empirephoenix 9 år sedan
förälder
incheckning
e4840e2e9f

+ 3 - 1
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 {

+ 3 - 1
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 {