| 45 | #include "Engine/Debug/DebugDraw.h" |
| 46 | |
| 47 | void SliderJoint::OnDebugDrawSelected() |
| 48 | { |
| 49 | const Vector3 source = GetPosition(); |
| 50 | const Vector3 normal = GetOrientation() * Vector3::Right; |
| 51 | float min = -100.0f, max = 100.0f; |
| 52 | if (EnumHasAnyFlags(_flags, SliderJointFlag::Limit)) |
| 53 | { |
| 54 | min = _limit.Lower; |
| 55 | max = _limit.Upper; |
| 56 | if (max < min) |
| 57 | Swap(min, max); |
| 58 | } |
| 59 | DEBUG_DRAW_LINE(source + normal * min, source + normal * max, Color::Green * 0.6f, 0, false); |
| 60 | |
| 61 | // Base |
| 62 | Joint::OnDebugDrawSelected(); |
| 63 | } |
| 64 | |
| 65 | #endif |
| 66 |
nothing calls this directly
no test coverage detected