Moderators: Sascha Willems, walaber
Otherwise I'm not sure how this function is different to calling update with a smaller timestep
int maxSteps = 5;
float timestep = 1.0f / 60.0f
NewtonWorld* world = NewtonCreate();
NewtonSetNumberOfSubsteps(world, maxSteps);
// game loop
while (isRrunning)
{
NewtonUpdate(m_world, timestep);
//run rest of game logic, AI, render etc
}
dVector drag(0.0f);
NewtonBodySetLinearDamping(m_body, 0.0f);
NewtonBodySetAngularDamping(m_body, &drag[0]);
- this appears to imply you simply call 'NewtonSetNumberOfSubsteps' and the engine handles it all internally which is clearly not the case.Julio Jerez wrote:you should just call the update with the same time step as if there was not sub stepping, the engine does by itself, here is a pseudo samples
- this appears to imply you simply call 'NewtonSetNumberOfSubsteps' and the engine handles it all internally which is clearly not the case.
Users browsing this forum: No registered users and 2 guests