Position of PhysicsType vs. position of geometry?

I built a moonlander like model for my physics tests and have the problem that the DynamicPhysicsObject created from it seem not to behave properly.

I positioned the model to have its center at the position which should touch the ground eg built it up from z=0 in local space.

Now i’m experiencing strange behavior based on which way i create the phys Obj i use.


  1. load with bounding property “box” - the model never actually touhes the ground (terrain block) but hoovers like halfe it’s height in air when touched down but when i throw it over it gets stuck like half in the ground.

    setting the localTranslation of the node that holds my model doesn’t help here.


  2. load with bounding property "obb" - the model touches down correctly but the simulation acts strange as on slopes it penetrates the ground rolls around some and then comes to a stand at the correct position.

    But when i throw it over it also sinks some into the ground.


  3. Physics type box - same as 1.


  4. Physics type cylinder - hey the cylinder is oriented wrong eg my lander rolls along on the ground - looks funny



    so i think:

    a) the phys Obj is only computed correctly for complex models when i use an oriented bounding box which gives me trouble at simulation time

    and b) PhysicsTypes should have a way of specifying how the type is oriented and positioned to the geometry/node containing the geometry
1) load with bounding property "box" - the model never actually touhes the ground (terrain block) but hoovers like halfe it's height in air when touched down but when i throw it over it gets stuck like half in the ground.
setting the localTranslation of the node that holds my model doesn't help here.

Sounds a bit like shochu's problem. Do you by any chance scale your model through jME?

Indeed i do. Which post do You refer to ?

I’ll check it with an unscaled model at home.



edit: ah, think i found it You refer to the updateGeometricsState after the scaling right? - testing that asap

Also try rendering the boundings to visually see what the physics is using for edges. That could help explain things.

Ok, that did the trick :slight_smile:

Best choice for me so far is obb which behaves like i expected it to, except that on rare ocassions my model seem to sink into the terrain block by a very small amount and get stuck there (maybe the same problem as with the missing triangles) - the thruster force isn’t able to get it loose until some fiddling with the steering thrusters to shake it, it lifts of finally 8-O impressive simulation of swamp terrain at least :wink:



I know that jme physics is in it’s early stages but i want to congrat You guys for what You did so far.

try increasing the step iterations and also increasing the step size. This will check the collisions more frequently per update. However, it is slower :?



Thanks for your remark, we appreciate it :slight_smile:



DP