- fix ConeCollisionShape

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10009 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 85059fd8a0
commit 1a4b918451
  1. 10
      engine/src/bullet/com/jme3/bullet/collision/shapes/ConeCollisionShape.java
  2. 6
      engine/src/jbullet/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();
}

@ -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();
}

Loading…
Cancel
Save