Class HeightfieldCollisionShape

All Implemented Interfaces:

public class HeightfieldCollisionShape extends CollisionShape
Uses Bullet Physics Heightfield terrain collision system. This is MUCH faster than using a regular mesh. There are a couple tricks though: -No rotation or translation is supported. -The collision bbox must be centered around 0,0,0 with the height above and below the y-axis being equal on either side. If not, the whole collision box is shifted vertically and things don't collide as they should.
  • Field Details

    • heightStickWidth

      protected int heightStickWidth
    • heightStickLength

      protected int heightStickLength
    • heightfieldData

      protected float[] heightfieldData
    • heightScale

      protected float heightScale
    • minHeight

      protected float minHeight
    • maxHeight

      protected float maxHeight
    • upAxis

      protected int upAxis
    • flipQuadEdges

      protected boolean flipQuadEdges
  • Constructor Details

    • HeightfieldCollisionShape

      protected HeightfieldCollisionShape()
    • HeightfieldCollisionShape

      public HeightfieldCollisionShape(float[] heightmap)
    • HeightfieldCollisionShape

      public HeightfieldCollisionShape(float[] heightmap, Vector3f scale)
  • Method Details