MCPcopy Create free account
hub / github.com/axmolengine/axmol / stepSimulate

Method stepSimulate

core/physics3d/Physics3DWorld.cpp:257–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257void 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
278void Physics3DWorld::debugDraw(Renderer* renderer)
279{

Calls 3

preSimulateMethod · 0.80
postSimulateMethod · 0.80
stepSimulationMethod · 0.45

Tested by

no test coverage detected