From 1a4b918451f9685d778fa8dcfe38b1f48954375d Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 26 Nov 2012 17:11:17 +0000 Subject: [PATCH] - fix ConeCollisionShape git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10009 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../bullet/collision/shapes/ConeCollisionShape.java | 10 +++++----- .../bullet/collision/shapes/ConeCollisionShape.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engine/src/bullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java b/engine/src/bullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java index 8806edfa4..0c1efb389 100644 --- a/engine/src/bullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java +++ b/engine/src/bullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java @@ -55,14 +55,14 @@ public class ConeCollisionShape extends CollisionShape { public ConeCollisionShape(float radius, float height, int axis) { this.radius = radius; - this.height = radius; + this.height = height; this.axis = axis; createShape(); } public ConeCollisionShape(float radius, float height) { this.radius = radius; - this.height = radius; + this.height = height; this.axis = PhysicsSpace.AXIS_Y; createShape(); } @@ -76,15 +76,15 @@ public class ConeCollisionShape extends CollisionShape { OutputCapsule capsule = ex.getCapsule(this); capsule.write(radius, "radius", 0.5f); capsule.write(height, "height", 0.5f); - capsule.write(axis, "axis", 0.5f); + capsule.write(axis, "axis", PhysicsSpace.AXIS_Y); } public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); radius = capsule.readFloat("radius", 0.5f); - radius = capsule.readFloat("height", 0.5f); - radius = capsule.readFloat("axis", 0.5f); + height = capsule.readFloat("height", 0.5f); + axis = capsule.readInt("axis", PhysicsSpace.AXIS_Y); createShape(); } diff --git a/engine/src/jbullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java b/engine/src/jbullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java index 36c9ced5d..834f86def 100644 --- a/engine/src/jbullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java +++ b/engine/src/jbullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java @@ -106,15 +106,15 @@ public class ConeCollisionShape extends CollisionShape { OutputCapsule capsule = ex.getCapsule(this); capsule.write(radius, "radius", 0.5f); capsule.write(height, "height", 0.5f); - capsule.write(axis, "axis", 0.5f); + capsule.write(axis, "axis", PhysicsSpace.AXIS_Y); } public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); radius = capsule.readFloat("radius", 0.5f); - radius = capsule.readFloat("height", 0.5f); - radius = capsule.readFloat("axis", 0.5f); + height = capsule.readFloat("height", 0.5f); + axis = capsule.readInt("axis", PhysicsSpace.AXIS_Y); createShape(); }