protected void createCollisionHeightfield(float[] heightmap, Vector3f worldScale) {
        this.scale = worldScale;
        this.heightScale = 1;//don't change away from 1, we use worldScale instead to scale
        
        this.heightfieldData = heightmap;

        float min = heightfieldData[0];
        float max = heightfieldData[0];
        // calculate min and max height
        for (int i=0; i<heightfieldData.length; i++) {
            if (heightfieldData[i] < min)
                min = heightfieldData[i];
            if (heightfieldData[i] > max)
                max = heightfieldData[i];
        }
        // we need to center the terrain collision box at 0,0,0 for BulletPhysics. And to do that we need to set the
        // min and max height to be equal on either side of the y axis, otherwise it gets shifted and collision is incorrect.
        if (max < 0)
            max = -min;
        else {
            if (Math.abs(max) > Math.abs(min))
                min = -max;
            else
                max = -min;
        }
        this.minHeight = min;
        this.maxHeight = max;

        this.upAxis = HeightfieldTerrainShape.YAXIS;
        this.flipQuadEdges = false;

        heightStickWidth = (int) FastMath.sqrt(heightfieldData.length);
        heightStickLength = heightStickWidth;


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

@author Brent Owens
jme3-jbullet/src/main/java/com/jme3/bullet/collision/shapes/HeightfieldCollisionShape.java