Hi,
I’m new to Odejava (to physics in general). I have a scene set up which consists of a floor and several walls. I’m dropping a small cube onto the floor with a random velocity and rotation.
Everything works great, until the cube starts to slow down from the friction. If the cube was rolling along the ground, and the friction slows it to a stop, it will completely stop, even if it is sitting on the ground at a massive angle (will sit on it’s edge instead of a face):
Is there something wrong with the way that I’m setting up my objects?
Worldwide Settings:
physics_JavaCollision.setSurfaceMu(1.0f);
physics_JavaCollision.setSurfaceBounce(0f);
physics_JavaCollision.setSurfaceBounceVel(5000.1f);
physics_JavaCollision.setSurfaceMode(Ode.dContactBounce);
physics_World.setStepInteractions(50);
physics_World.setStepSize(0.05f);
Contact between cube and wall:
physics_Contact.setMode(Ode.dContactBounce | Ode.dContactApprox1);
physics_Contact.setBounce(0.2f);
physics_Contact.setBounceVel(0.01f);
Creating the cube:
this.myBody = new Body(physics_World);
this.myBody.setGeom(new GeomBox(DIAMETER * 2, DIAMETER * 2, DIAMETER * 2));
this.myBody.adjustMass(1.0f);
this.myBody.resetRotationAndForces();
physics_HashSpace.addBodyGeoms(this.myBody);
The floor and walls of the box are simple GeomBoxes which have been added to the world without a Body.
Thanks for any help! More code is available is needed to diagnose the problem.