CharacterControl bouncing

Hello everyone, I have the next problem!.

My WalkCharacter (CharacterControl + CapsuleCollisionShape) is bouncing in certains areas of my floors, but this happens only with the boxes, not with Quads.



Boxes floor:

http://img502.imageshack.us/img502/660/screenshotix.jpg



Quad floor:

http://img600.imageshack.us/img600/7/screenshot2sm.jpg



My first floor is made of one Quad, but the others (second, third, etc…) are made of boxes unions (Cube geometry).

I don’t know if that can generate problems, but the charactercontrol bounces in certains areas on the boxes.

Large boxes are about the worst collision shape you could have. Best subdivide the mesh so the triangles are not too large. Playing with the stepHeight might solve some shaking issues but generally large boxes are not a good floor.

I have no problems with the boxes as floor because I made another example with two huge boxes, one under another and my character walks normally, My own game it’s made inside a box, but it’s not the box object, I used 6 quads to make the floor, walls and roof, using the next method:



public static Geometry makePlane(float x, float y, String name, String texturePath, Vector3f localTranslation, Quaternion quaternion, Vector2f scaleTexture, boolean transparent) {

Quad quad = new Quad(x, y);

Geometry geometry = new Geometry(name, quad);

Material material = new Material(JBombContext.ASSET_MANAGER, MatDefs.UNSHADED);

Texture texture = JBombContext.ASSET_MANAGER.loadTexture(texturePath);

material.setTexture(“ColorMap”, texture);

geometry.setMaterial(material);

geometry.setLocalTranslation(localTranslation);

if (quaternion != null)

geometry.setLocalRotation(quaternion);

if (scaleTexture != null) {

quad.scaleTextureCoordinates(scaleTexture);

texture.setWrap(Texture.WrapMode.Repeat);

}

if (transparent) {

geometry.getMaterial().getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);

geometry.setQueueBucket(RenderQueue.Bucket.Transparent);

}

RigidBodyControl physics = new RigidBodyControl(0f);

geometry.addControl(physics);

JBombContext.JBOMB.getBulletAppState().getPhysicsSpace().add(physics);

JBombContext.ROOT_NODE.attachChild(geometry);

return geometry;

}



Would be a problem with using those quads and rotating them?

I guess something is wrong with it that they don’t let the character walks normally



why should stepHeight be the solution?