can anyone show the correct code to reset a game when using physics engine (JBOX2D)? I am working on a game using Processing and I am unable to reset the game so that the user can play another round. Thanks in advance
Asked
Active
Viewed 75 times
1 Answers
1
A google search will bring you to this page:
JBox2D with BoxWrap2D Tutorial
from which I can see that doing
physics.destroy();
physics = new Physics(this, width, height);
and recreating your objects will reset the sketch..

Petros Koutsolampros
- 2,790
- 1
- 14
- 20