Problems using RigidBody

hi guys,

for some practice i am working on some kind of a “2d” sidescroller (its actual 3d, but with z-axis fixed at 0)

i just wanted to start with some plattforms to walk on.

i create these platforms:
[java]
private void initGround(int transX, int transY, ColorRGBA color) {

    Box boden1 = new Box(20, 0.2f, 3);
    Geometry bodengeom = new Geometry("Box", boden1);
    Material bodenmat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    bodenmat.setColor("Color", color);
    bodengeom.setMaterial(bodenmat);
    bottomNode.attachChild(bodengeom);
    bodengeom.setLocalTranslation(transX + offset - 5, transY, 0);
    bodengeom.addControl(new RigidBodyControl(0));
    bulletAppState.getPhysicsSpace().addAll(bodengeom);

}

[/java]

and want my character to walk on.

it works on one part of the platforms, but approximately on the half the chracter just falls through it.

i activated bulletAppState.setDebugEnabled(true); and saw that there is an diagonal edge cutting through the boxes shape, right whre the character falls. This lets me think that the collision shape of the rigidbody is not the same as the boxes geometry.

what can i do to fix this problem?

thx,

Birchwood

ok,

i know use betterCharacterControl instead of characterControl and now it works.

at the moment i am not satisfied how fast the character jumps and falls, is there any source to see how gravity and jumpforce interact with each other?

@Birchwood said: how gravity and jumpforce interact with each other?

i am quite shure that to make the jump more realisticall you should increase the charaters mass and not the gravity.