Bounce, bounce, gone!

I'm making a very simple test app to get used to JME-Physics. I've added a TerrainBlock to a StaticPhysicsNode and have a sphere (DynamicPhysicsNode) falling onto the terrain. The sphere collides with the terrain OK but it behaves very strangely! Every time it bounces, the bounce gets more and more severe until it goes flying off randomly, is this just ODE being strange, as I know it can be from time to time, or have I set up the game wrong?



Thanks.

sphere-trimesh collisions were reported on the ODE mailing list to behave strange some times, maybe this is one of the effects :expressionless:

The test in cvs uses a box on terrain and works fine, maybe you should change it to a box to check it's really sphere-trimesh problem.

Thanks for the advice, I tried it and… well the box does a bit better, but it just accelerates to the right!! It doesn't bounce it just slides along the terrain. Have I set up the terrain incorrectly?



TerrainBlock terrain = buildTerrain();
phTerrain = getPhysicsSpace().createStaticNode();
phTerrain.attachChild(terrain);
phTerrain.generatePhysicsGeometry();
       
locale.attachChild(phTerrain);



Something tells me its not that simple to get a TerrainBlock to be a physical object.

It should be. Did you take a look at TestGenerateTerrain? Maybe you can figure our the difference. (Btw, I just noticed there are sphere in that test, too)

I believe I might be having the same problem, atleast as far as the bouncing goes.



I’ve looked at all the tutorials and decided to make my own “boxthrower” example. However whenever I throw a box it bounces very unnatural and keeps spinning arround on one edge.







Also, one detail that i’ve noticed is that the green cross is actually higher than the physicsbox of the staticNode. This same box is used to make it bounce.

Whenever I throw a box (create a box, attach it the dynamic node and apply force) there is a green cross appearing directly above my box and eventually falls down, “dragging” the box with him.



I checked this with example (e.a. the falling box tutorial) but that green cross doesnt appear there.

The green cross is the center of the physics node and the center of gravity of that node. Thus it should be near the collision geometry (connection from the cross to the geoms should be short). Don't set the translation on the geometry but on the node.