nathanwilliams6
27-09-2006 13:39:06
I have noticed that even though i have everything to scale, sizes/masses etc, that everything seems really slow unless i multiply the time elapsed by a multiplier (to trick the engine into thinking more time has passed than has)
i use a stardard timeslicing method, everything is correct size*100, all masses are correct mass*100.
Any tips on how to make it more realistic, not as slow ?
nathanwilliams6
27-09-2006 16:16:43
Information:
void myClass::forceCallback( OgreNewt::Body* me )
{
//apply a simple gravity force.
Ogre::Real mass;
Ogre::Vector3 inertia;
me->getMassMatrix(mass, inertia);
Ogre::Vector3 force(0, -9.8f, 0);
force *= mass;
me->addForce( force );
}
my scale
1 unit size = 1cm
1 unit mass = 1g
my model is 2.5 cm by 2.5 cm by 0.2cm (cylinder)
(2.5 units radius 0.2 units depth)
am i using the correct settings ? shoudl my gravity simulation be different ?
walaber
28-09-2006 05:43:22
-9.8 for gravity is in meters / second^2
but you're general units are in cm.
to fix this, either change your overall scale of objects and distances to 1unit = 1meter, or change the gravity constant to -980.0.
nathanwilliams6
28-09-2006 10:13:15
what about the masses ?
if i had an object that was 10g in mass, would i use a mass of 10 or 10/1000 (to make it Kg)
because the object is 100 times bigger than it would be is it 10 * 100 / 1000 ?