- O3_2016-02-19.rar
Example06.exe destroys and creates the world and GhostInTheMachine.exe doesn't destroy and create the world.
All bodies are destroyed with the NewtonDestroyBody (FCubes[X].Free calls it for the cubes).
- Code: Select all
if FRestart then
begin
FRestart := False;
for X := 0 to High(FCubes) do
FCubes[X].Free;
NewtonDestroyBody(FloorBody);
NewtonUpdate(FWorld,1/60);
//NewtonDestroy(FWorld);
//MakeWorld;
CreateFloor;
MakeScene();
NewtonUpdate(FWorld,1/60);
FLastFrameTime := 0;
SystemTimer.Refresh;
end;
The following video shows the issue. The app switches between mode 3 and 4. At about 34 seconds into the video is one of the obvious instances of the bug.