Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit 027a73f

Browse files
committed
Drawing arrow with direction of the selected directional/spot light in editor
1 parent 92021a8 commit 027a73f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

FlaxEditor/SceneGraph/Actors/DirectionalLightNode.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,14 @@ public DirectionalLightNode(Actor actor)
1515
: base(actor)
1616
{
1717
}
18+
19+
/// <inheritdoc />
20+
public override void OnDebugDraw(ViewportDebugDrawData data)
21+
{
22+
base.OnDebugDraw(data);
23+
24+
var transform = Actor.Transform;
25+
DebugDraw.DrawArrow(transform.Translation, transform.Orientation, Color.Red, 1.0f, 0.0f, false);
26+
}
1827
}
1928
}

FlaxEditor/SceneGraph/Actors/SpotLightNode.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,14 @@ public SpotLightNode(Actor actor)
1515
: base(actor)
1616
{
1717
}
18+
19+
/// <inheritdoc />
20+
public override void OnDebugDraw(ViewportDebugDrawData data)
21+
{
22+
base.OnDebugDraw(data);
23+
24+
var transform = Actor.Transform;
25+
DebugDraw.DrawArrow(transform.Translation, transform.Orientation, Color.Red, 0.3f, 0.0f, false);
26+
}
1827
}
1928
}

0 commit comments

Comments
 (0)