Added delta timestep to 2d simulation

This commit is contained in:
n00b
2024-12-01 00:15:41 -05:00
parent f008cf839b
commit cfad58b99c
12 changed files with 1083 additions and 537 deletions

View File

@@ -307,7 +307,7 @@ struct rc_physicsWorld2D_obj
b2World* world;
rc_contactListener_obj* contact_listener;
float time_stamp;
Uint32 time_stamp;
float timeStep = 1/60.0; //the length of time passed to simulate (seconds)
int velocityIterations = 8; //how strongly to correct velocity
int positionIterations = 3; //how strongly to correct position