Merge pull request #599 from stephengold/v3.1

CapsuleCollisionShape: warn about scaling only if it's not identity
This commit is contained in:
Rémy Bouquet 2017-01-17 21:31:31 +01:00 committed by GitHub
commit 5d2c89f040
2 changed files with 7 additions and 3 deletions

View File

@ -86,8 +86,10 @@ public class CylinderCollisionShape 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, "CylinderCollisionShape cannot be scaled"); Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled");
} }
}
public void write(JmeExporter ex) throws IOException { public void write(JmeExporter ex) throws IOException {
super.write(ex); super.write(ex);

View File

@ -90,8 +90,10 @@ public class CylinderCollisionShape 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, "CylinderCollisionShape cannot be scaled"); Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "CylinderCollisionShape cannot be scaled");
} }
}
public void write(JmeExporter ex) throws IOException { public void write(JmeExporter ex) throws IOException {
super.write(ex); super.write(ex);