Fix gizmos debug draw shapes
This commit is contained in:
@@ -136,8 +136,11 @@ void PointLight::Draw(RenderContext& renderContext)
|
||||
|
||||
void PointLight::OnDebugDraw()
|
||||
{
|
||||
// Draw source tube
|
||||
DEBUG_DRAW_WIRE_TUBE(GetPosition(), GetOrientation(), SourceRadius, SourceLength, Color::Orange, 0, true);
|
||||
if (SourceRadius > ZeroTolerance || SourceLength > ZeroTolerance)
|
||||
{
|
||||
// Draw source tube
|
||||
DEBUG_DRAW_WIRE_TUBE(GetPosition(), GetOrientation(), SourceRadius, SourceLength, Color::Orange, 0, true);
|
||||
}
|
||||
|
||||
// Base
|
||||
LightWithShadow::OnDebugDraw();
|
||||
|
||||
@@ -184,8 +184,11 @@ void SpotLight::Draw(RenderContext& renderContext)
|
||||
|
||||
void SpotLight::OnDebugDraw()
|
||||
{
|
||||
// Draw source tube
|
||||
DEBUG_DRAW_WIRE_SPHERE(BoundingSphere(GetPosition(), SourceRadius), Color::Orange, 0, true);
|
||||
if (SourceRadius > ZeroTolerance)
|
||||
{
|
||||
// Draw source tube
|
||||
DEBUG_DRAW_WIRE_SPHERE(BoundingSphere(GetPosition(), SourceRadius), Color::Orange, 0, true);
|
||||
}
|
||||
|
||||
// Base
|
||||
LightWithShadow::OnDebugDraw();
|
||||
|
||||
Reference in New Issue
Block a user