Ball falling through the floor [solved]

isaac

17-01-2007 11:21:05

Hi, I've got my first OgreOde program working and I'm having some problems.

I've created a plane and a sphere. The sphere is 2 meters above the ground when the program starts. My unit is centimeters for everything, so 2 meters is 200 units in Ogre coordinates and the Gravity is -908.665. The ball has a radius of 11 cms.

The ball starts falling and when it reaches the plane the collision() function is called correctly. There I return "true", but the ball keeps falling (at a lower speed).

If I change

OgreOde::SphereMass mass(1.0,11);
mass.setDensity(5.0,11);


to


OgreOde::SphereMass mass(1.0,1);
mass.setDensity(5.0,1);


it works perfectly.

I don't understand it, can you help me? :)

tuan kuranes

17-01-2007 12:24:54

This is more an ODE problem, so you should use Ode mailing list / Wikis
Anyway, using ODE it's not recommanded to use big numbers "-908.665", and big differences (big box against small ones.)

isaac

19-01-2007 10:42:21

I moved everything to meters, thus having smaller numbers, and everything seems to work fine now.

Thanks