Class CapsuleCollisionShape

java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.CapsuleCollisionShape
All Implemented Interfaces:
Savable

public class CapsuleCollisionShape extends CollisionShape
Basic capsule collision shape
  • Field Details

    • radius

      protected float radius
    • height

      protected float height
    • axis

      protected int axis
  • Constructor Details

    • CapsuleCollisionShape

      protected CapsuleCollisionShape()
    • CapsuleCollisionShape

      public CapsuleCollisionShape(float radius, float height)
      Creates a new CapsuleCollisionShape with the given radius and height. The capsule is oriented along the Y axis (1).
      Parameters:
      radius - the radius of the capsule
      height - the height of the capsule
    • CapsuleCollisionShape

      public CapsuleCollisionShape(float radius, float height, int axis)
      Creates a capsule shape around the given axis (0=X,1=Y,2=Z).
      Parameters:
      radius - the desired unscaled radius
      height - the desired unscaled height of the cylindrical portion
      axis - which local axis for the height: 0→X, 1→Y, 2→Z
  • Method Details