You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I found tutor newton
// Create the Newton world.
NewtonWorld* const world = NewtonCreate();
NewtonCollision* const cs_sphere = NewtonCreateSphere(world, 1, 0, NULL);
NewtonCollision* const cs_ground = NewtonCreateBox(world, 100, 0.1, 100, 0, NULL);
// Step the (empty) world 60 times in increments of 1/60 second.
const float timestep = 1.0f / 60;
for(int i=0; i<60; i++) {
NewtonUpdate(world, timestep);
}
// Clean up.
NewtonDestroyAllBodies(world);
NewtonDestroy(world);
All reactions