Search in sources :

Example 1 with CapsuleShapeX

use of com.bulletphysics.collision.shapes.CapsuleShapeX in project jmonkeyengine by jMonkeyEngine.

the class CapsuleCollisionShape method createShape.

protected void createShape() {
    switch(axis) {
        case 0:
            cShape = new CapsuleShapeX(radius, height);
            break;
        case 1:
            cShape = new CapsuleShape(radius, height);
            break;
        case 2:
            cShape = new CapsuleShapeZ(radius, height);
            break;
    }
    cShape.setLocalScaling(Converter.convert(getScale()));
    cShape.setMargin(margin);
}
Also used : CapsuleShapeZ(com.bulletphysics.collision.shapes.CapsuleShapeZ) CapsuleShapeX(com.bulletphysics.collision.shapes.CapsuleShapeX) CapsuleShape(com.bulletphysics.collision.shapes.CapsuleShape)

Aggregations

CapsuleShape (com.bulletphysics.collision.shapes.CapsuleShape)1 CapsuleShapeX (com.bulletphysics.collision.shapes.CapsuleShapeX)1 CapsuleShapeZ (com.bulletphysics.collision.shapes.CapsuleShapeZ)1