DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D
http://www.reactphysics3d.com
zlib License
1.54k stars 223 forks source link

Assert crashes if trying to update an empty physics world #30

Closed perkele1989 closed 6 years ago

perkele1989 commented 7 years ago

A simple check at the top of the update function fixes this for me:

// Update the physics simulation
/**
 * @param timeStep The amount of time to step the simulation by (in seconds)
 */
void DynamicsWorld::update(decimal timeStep) {

    if (mBodies.size() < 1)
    {
      return;
    }

    // Rest of function goes here ...
DanielChappuis commented 7 years ago

Thanks for reporting this. This issue has already been cited here : https://github.com/DanielChappuis/reactphysics3d/issues/26

This will be fixed in the next release 0.7 of the library.

DanielChappuis commented 6 years ago

This issue has been fixed in the version v0.7.0 of ReactPhysics3D that has just been released. Thanks a lot for reporting this.