anothertime12 wrote:P.S. with careful tuning of movement speeds and taking three NewtonUpdate per game loop the 'rolling on curved surfaces' seems to be working quite well now.
that's what I though at first, but the you mentioned the object move very wildly and that confused me.
In general with a higher simulation rate it should work better, because the error in each step will be within the range of the contact penetration limit.
however you do not want the physics to delivery work in the penalty range, you want the system to work by the range where the physics contributions dominate the penalties to correct integration errors.
what you show in the picture to me is almost identical case to the Ship Simulation game i'd mention before, a large mesh that move kinematically.
for that the engine function
- Code: Select all
void NewtonBodyIntegrateVelocity (const NewtonBody* const bodyPtr, dFloat timestep)
that when set properly, it makes it works to near perfection.
The engine does not do it automatically, you need do some set up on your size, and I can help you, the reason is that it is up to the end user to decide how to convert displacement to velocities.
for this the engine provide the Listener manager.
there are few example in the Sandbox that you can look at.
so what you do is that you register a listener that contain a list of those animated bodies
then in the pre update you iterate over each body and you set the linear and angular velocity extracted from the desired velocity and angular velocity
this will instruct the engine that the surface of that object is movable, then in
post update you iterate over the list again calling NewtonBodyIntegrateVelocity on each body.
the only thing you need to do on your side is to extract the linear and angular velocity from teh delta translation and delta rotation. and thsi is the part the engine can not do.
if you do that currently, the result should be near perfect.
do not get fooled by the fact that, that is seem to work an accept that, in is in fact not working at all, it is simply prevention from interpenetration, because the player is not receiving the velocity of the surface.
in the absent of anythong that will be fine, an people will get use to it, but it will no resenble the effect of people inside a drumb, which is provided bu the motion of the surface.
In fact lot of Coriolis and centripetal accelration emerge from that naturally.