void Urho2DPhysicsRope::HandleUpdate(StringHash eventType, VariantMap& eventData) { using namespace Update; // Take the frame time step, which is stored as a float float timeStep = eventData[P_TIMESTEP].GetFloat(); // Move the camera, scale movement with time step MoveCamera(timeStep); PhysicsWorld2D* physicsWorld = scene_->GetComponent<PhysicsWorld2D>(); physicsWorld->DrawDebugGeometry(); }
void Urho2DConstraints::HandlePostRenderUpdate(StringHash eventType, VariantMap& eventData) { PhysicsWorld2D* physicsWorld = scene_->GetComponent<PhysicsWorld2D>(); if (drawDebug_) physicsWorld->DrawDebugGeometry(); }
void TowerApp::HandlePostRenderUpdate(StringHash eventType, VariantMap &eventData) { PhysicsWorld2D *physicsWorld = scene->GetScene()->GetComponent<PhysicsWorld2D>(); if (physicsWorld && drawDebugGeometry) physicsWorld->DrawDebugGeometry(); }