| 255 | } |
| 256 | |
| 257 | void Physics3DWorld::stepSimulate(float dt) |
| 258 | { |
| 259 | if (_btPhyiscsWorld) |
| 260 | { |
| 261 | setGhostPairCallback(); |
| 262 | // should sync kinematic node before simulation |
| 263 | for (auto&& it : _physicsComponents) |
| 264 | { |
| 265 | it->preSimulate(); |
| 266 | } |
| 267 | _btPhyiscsWorld->stepSimulation(dt, 3); |
| 268 | // sync dynamic node after simulation |
| 269 | for (auto&& it : _physicsComponents) |
| 270 | { |
| 271 | it->postSimulate(); |
| 272 | } |
| 273 | if (needCollisionChecking()) |
| 274 | collisionChecking(); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | void Physics3DWorld::debugDraw(Renderer* renderer) |
| 279 | { |
no test coverage detected