Physics Space Configuration

Im really having difficulties of how to configure the physics space correctly in my action game, the character models dont behave as i expected, when they collide, they fly far away like they have been hit by a huge truck.



I have set the directional gravity to (0, -9.81, 0) to resemble our world's gravity, but seems like it still doesnt work in the game world. my first attempt to this problem was setting the mass to 1000f,  then i encounterd another problem when i made some AI enemies to wander around, when they hit each other, they are rotated and lean on one side, as they were walking with one foot, instead of firmly stopping on their location.



then i had another problem to make a character pushing a box (though in the end i made it works using non-physics translation), just because it is difficult to get the settings correct and to make the character really pushes a box as we do, if the box is heavier than the character, the character will bounce as it were pushed away by the box, so i clear the dynamic of the character when it pushes a box, but then the box fly away as it were a balloon.



so, i think i need an exact physics space configuration to make all things work correctly, such as, mass, center of mass, gravity, friction, material, etc, please kindly advice me, thanks.

Masses should be "near" 1. 1000 should not be required.



How do you move your character? Do you probably set it's position direction (via local translation)? If yes, that could be the problem. You need to move the character by forces to get a smooth physical simulation.

(Were you the one changing the physical geometries by changing scale etc. after generatePhysicsGeometry ? If yes, you are experiencing the downside of this practice now :|)

oh yeah, you are right, im controlling the character using local translation, i think thats my mistake  :stuck_out_tongue:

because i thought it would be complicated if i change everything to physics, so i leave my controller as it is (i did it before moving my game state to physics state)



and yes, i was the one who change the physical geometries after generatePhysicsGeometry, because without that, the collision would be odd as the bounding box of the character is updated but its physics is not… i think i need to do some experiments with physics a lot more…



anyway, what is the metric for mass? what value of 1f represents?

It depends on your other units. You can read about the dependencies of the different units for position, velocity, acceleration, force and mass in the ODE manual or some general physics book.