Reference

step()

Description

Step the simulation. Move all bodies according to gravity, mass and energy. This may be useful to accelerate the simulation with less computer ressources. The world.draw() function already step the simultion forward, so if you use world.draw() and world.step() at the same time, you double the simulation speed.

Exemples

PPWorld world = new PPWorld();

//Step simulation a first time
world.step();
//Step simulation a second time
world.step();
//Step simulation a third time and draw world
world.draw();

Syntax

world.step();

Parameters

none