| 344 | #include "Engine/Debug/DebugDraw.h" |
| 345 | |
| 346 | void RigidBody::OnDebugDrawSelected() |
| 347 | { |
| 348 | // Draw center of mass |
| 349 | if (!_centerOfMassOffset.IsZero()) |
| 350 | { |
| 351 | DEBUG_DRAW_WIRE_SPHERE(BoundingSphere(GetPosition() + (GetOrientation() * (GetCenterOfMass() - GetCenterOfMassOffset())), 5.0f), Color::Red, 0, false); |
| 352 | } |
| 353 | DEBUG_DRAW_WIRE_SPHERE(BoundingSphere(GetPosition() + (GetOrientation() * GetCenterOfMass()), 2.5f), Color::Aqua, 0, false); |
| 354 | |
| 355 | // Draw all attached colliders |
| 356 | for (Actor* child : Children) |
| 357 | { |
| 358 | const auto collider = Cast<Collider>(child); |
| 359 | if (collider && collider->GetAttachedRigidBody() == this) |
| 360 | collider->OnDebugDrawSelf(); |
| 361 | } |
| 362 | |
| 363 | Actor::OnDebugDrawSelected(); |
| 364 | } |
| 365 | |
| 366 | #endif |
| 367 |
nothing calls this directly
no test coverage detected