nathanwilliams6
06-11-2006 14:24:50
Im working on a project that uses OgreNewt, i cant go into much detail due to NDA's etc.
But in order to get the simulation to go at a realistic (to life) speed, i had to update elapsed time in the frame listener using a multiplier.
Eg.
m_rElapsed += evt.timeSinceLastFrame * m_rSpeed;
this works fine, but is inherently flawed, in that the newton is doing more calculations than should be needed, ie. every 0.1 secs thats elapsed, Newton does 0.3 secs worth of updates (in steps, like your example frame listener).
Everything in my world is 100 times bigger, i.e. 1 cm = 1 unit. To simulate this properly, and as previously stated by yourself (walaber) i would need to increase gravity force by multiplying it by 100.
I tried this, and although it looked realistic (speed wise), my objects were falling though one another, cylinders were passing through other cylinders and tree collisions.
I think i have done this right, i increased the size of my objects to a factor of 100, and therefore the mass of said objects and gravity by a factor of 100.
Therefore i am left with a:
Object x 100 size
Mass x 100 size
Gravity and other forces x 100 size
and yet, this go pear shaped, things pass though one another, everything seems like its made of led.
Any advice or pointers on how to make this simulation work as intended would be appreciated.
But in order to get the simulation to go at a realistic (to life) speed, i had to update elapsed time in the frame listener using a multiplier.
Eg.
m_rElapsed += evt.timeSinceLastFrame * m_rSpeed;
this works fine, but is inherently flawed, in that the newton is doing more calculations than should be needed, ie. every 0.1 secs thats elapsed, Newton does 0.3 secs worth of updates (in steps, like your example frame listener).
Everything in my world is 100 times bigger, i.e. 1 cm = 1 unit. To simulate this properly, and as previously stated by yourself (walaber) i would need to increase gravity force by multiplying it by 100.
I tried this, and although it looked realistic (speed wise), my objects were falling though one another, cylinders were passing through other cylinders and tree collisions.
I think i have done this right, i increased the size of my objects to a factor of 100, and therefore the mass of said objects and gravity by a factor of 100.
Therefore i am left with a:
Object x 100 size
Mass x 100 size
Gravity and other forces x 100 size
and yet, this go pear shaped, things pass though one another, everything seems like its made of led.
Any advice or pointers on how to make this simulation work as intended would be appreciated.