Showing the changes to libraries/physics/src/PhysicsEngine.cpp (1 of 214 files). Show all
Unified · Split
| @@ -241,7 +241,7 @@ void PhysicsEngine::stepSimulation() { · 240 unmodified lines | |||
| 241 | float timeStep = btMin(dt, MAX_TIMESTEP); | 241 | float timeStep = btMin(dt, MAX_TIMESTEP); |
| 242 | 242 | ||
| 243 | if (_myAvatarController) { | 243 | if (_myAvatarController) { |
| 244 | // ADEBUG TODO: move this stuff outside and in front of stepSimulation, because | 244 | // ADEBUG TODO: move this stuff outside and in front of stepSimulation, because |
| 245 | // the updateShapeIfNecessary() call needs info from MyAvatar and should | 245 | // the updateShapeIfNecessary() call needs info from MyAvatar and should |
| 246 | // be done on the main thread during the pre-simulation stuff | 246 | // be done on the main thread during the pre-simulation stuff |
| 247 | if (_myAvatarController->needsRemoval()) { | 247 | if (_myAvatarController->needsRemoval()) { |
| @@ -263,7 +263,8 @@ void PhysicsEngine::stepSimulation() { · 15 unmodified lines | |||
| 263 | updateContactMap(); | 263 | updateContactMap(); |
| 264 | }; | 264 | }; |
| 265 | 265 | ||
| 266 | int numSubsteps = _dynamicsWorld->stepSimulation(timeStep, PHYSICS_ENGINE_MAX_NUM_SUBSTEPS, PHYSICS_ENGINE_FIXED_SUBSTEP, onSubStep); | 266 | int numSubsteps = _dynamicsWorld->stepSimulationWithSubstepCallback(timeStep, PHYSICS_ENGINE_MAX_NUM_SUBSTEPS, |
| 267 | PHYSICS_ENGINE_FIXED_SUBSTEP, onSubStep); | ||
| 267 | if (numSubsteps > 0) { | 268 | if (numSubsteps > 0) { |
| 268 | BT_PROFILE("postSimulation"); | 269 | BT_PROFILE("postSimulation"); |
| 269 | _numSubsteps += (uint32_t)numSubsteps; | 270 | _numSubsteps += (uint32_t)numSubsteps; |