void Step( float delta )
void Step( float delta, int subSteps )
void Step( float worldTime, float delta, int subSteps )

robot_2Generated
code_blocksInput

Description

The Step method advances the physics simulation by a specified time increment. This method is essential for updating the state of the physics world, allowing for the simulation of motion and interactions between physics bodies over time.

Usage

Call the Step method with a delta parameter representing the time step in seconds. This method should be called regularly, typically once per frame or tick, to ensure the physics simulation progresses smoothly.

Example

// Create a new PhysicsWorld instance
PhysicsWorld physicsWorld = new PhysicsWorld();

// Define the time step (e.g., 1/60th of a second for 60 FPS)
float deltaTime = 1.0f / 60.0f;

// Advance the physics simulation by the time step
physicsWorld.Step(deltaTime);