Ok, maybe someone knows what I'm missing. I actually have 2 problems, but it's the physics one that puzzles me.
I have 1 static floor and 3(2 wood, 1 iron) dynamic boxes of various sizes.
heres my creation code.
private DynamicPhysicsNode createDynamicBox(HashMap res) {
// create dynamic node
DynamicPhysicsNode dynamicNode = physicsGameState.getPhysicsSpace().createDynamicNode();
debugGameState.getRootNode().attachChild( dynamicNode );
String id = (String)res.get("id");
String mat = (String)res.get("material");
float x, y, z;
float width, height, depth;
x = Float.valueOf((String)res.get("x") );
y = Float.valueOf((String)res.get("y") );
z = Float.valueOf((String)res.get("z") );
width = Float.valueOf((String)res.get("width") );
height = Float.valueOf((String)res.get("height") );
depth = Float.valueOf((String)res.get("depth") );
final Box visualFallingBox = new Box( (String)res.get("id") , new Vector3f(), width, height, depth );
dynamicNode.attachChild( visualFallingBox );
dynamicNode.generatePhysicsGeometry();
dynamicNode.getLocalTranslation().set(x,y,z);
dynamicNode.setMaterial(stringToMaterial(mat));
dynamicNode.computeMass();
return dynamicNode;
}
now, once debug and phsycs states are activated the 3 dynamic nodes just sorta fly up to the sky. they are set to fall on each other, but in no way does that happen. am I missing something in my creation code that causing something funny.
the other problem and less concern. is that i'm currently not texturing or colouring. so the everything is textured with this matrix esque pattern.