Skill & Range Indicators¶
Indicators project onto opaque ground through the same Renderer Feature. No Decal feature is required.
Show a shape¶
With using PixitGames.HighlightKit;, call these methods from your game code. Positions/directions are Vector3 values supplied by your game.
Indicator circle = IndicatorSystem.ShowCircle(center, radius);
Indicator ring = IndicatorSystem.ShowRing(center, innerRadius, outerRadius);
Indicator cone = IndicatorSystem.ShowCone(origin, direction, angleDegrees, range);
Indicator line = IndicatorSystem.ShowLine(origin, direction, length, width);
Indicator arrow = IndicatorSystem.ShowArrow(origin, direction, length, width);
Indicator reticle = IndicatorSystem.ShowReticle(center, radius);
Directions are flattened onto the ground plane. Sizes use world units; cone angle uses degrees.
Keep the handle¶
Each Show method returns an Indicator struct handle. Copies reference the same indicator. Store it for individual updates and hiding.
This complete component shows a following circle:
using PixitGames.HighlightKit;
using UnityEngine;
public class MovingRange : MonoBehaviour
{
Indicator _range;
void OnEnable()
{
_range = IndicatorSystem.ShowCircle(transform.position, 3f);
}
void Update()
{
if (!_range.IsActive) return;
_range.Position = transform.position;
_range.IsTargetValid = true; // Replace with your target validation.
_range.Progress = 0.5f; // Replace with castTime / castDuration.
}
void OnDisable() => _range.Hide();
}
Discarding the handle loses individual control. IndicatorSystem.HideAll() hides all indicators and invalidates all handles.
After Hide(), the handle is stale: reads return defaults, writes do nothing and the Editor reports a one-time warning. Call Show again for a new handle. Hide() is safe for already-hidden or never-assigned handles. IsActive checks validity.
Cast progress and target state¶
Progress runs from 0 to 1, filling at full opacity over the base opacity.
| Shape | Outward | Sweep |
|---|---|---|
| Circle | Center outward | Clockwise from Direction |
| Ring | Inner edge outward | Clockwise from Direction |
| Cone | Tip outward | Across its angle from left to right |
| Line / Arrow | Start outward | Always uses outward fill |
| Reticle | Fill ignored | Progress lights clockwise from Direction |
IndicatorFill.Outward is the default. The built-in reticle is full-opacity line art; progress brightens the ring and glows on both sides of the line. Textured reticles light clockwise without the glow.
IsTargetValid = false selects the feature's invalid color unless an explicit Color override exists. ClearColor() restores valid/invalid colors.
Textures¶
Texture replaces arrow or reticle art; other shapes ignore it. Alpha defines the shape; RGB multiplies the indicator color, so white artwork adopts valid/invalid colors. Texture top points along Direction.
- Reticle: square artwork covers a square with side
2 × Radius. - Arrow: its top square is the head, preserving proportions at the tip; the rest stretches as the shaft. Keep the shaft uniform; 128 × 512 works well. A square texture is all head; arrows shorter than Width show only its top.
Import with Wrap Mode: Clamp, Generate Mip Maps: on, Alpha Is Transparency: on, sRGB: on, and a few transparent border pixels. Textured arrows/reticles have no border line. Arrow progress fills its texture at full opacity.
Renderer Feature > Indicators¶
| Setting | Default | Behavior |
|---|---|---|
| Valid Color | Ice #CCF2FF, alpha 0.9 |
Border/filled-area color and opacity |
| Invalid Color | Red, alpha 0.9 | Invalid target without color override |
| Base Opacity | 0.35 | Unfilled opacity relative to color alpha |
| Border Width | 0.06 | World units, at least one screen pixel; 0 disables border |
| Edge Softness | 0.02 | Outer-edge fade in world units |
| Intensity | 1 | Brightness; above 1 can bloom with HDR/Bloom |
| Projection Depth | 1 | Reach above and below position in world units |
| Slope Limit | 50 | Maximum fully receiving slope, then fades over 6 degrees; 90 projects onto every surface |
| Receiver Layers | Everything | Layers receiving projection |
Ground projection¶
Projection runs along world Y. Surfaces must be within Projection Depth above/below the position. Near both boundaries, projection fades instead of clipping sharply.
Set Slope Limit at least as high as the steepest walkable ramp. It keeps walls, step risers and vertical character surfaces clean. Upward-facing parts within depth, such as box tops or feet, can still receive it.
Required ramp reach at the edge is radius × tan(ramp angle): a 2.5 m circle needs about 0.9 m at 20° and 1.75 m at 35°.
To exclude characters completely, put them on a separate layer and remove it from Receiver Layers. This adds a receiver depth pass; other geometry in front still covers the indicator. Everything has no additional filter-pass cost.
Range Indicator component¶
For tower ranges or traps, add Pixit Games > Highlight Kit > Range Indicator. It shows while enabled, follows position and, for cones/lines/arrows, forward direction. It also appears in Edit Mode.
Settings are exposed as properties (Shape, Radius, Color, Progress, and others). Indicator returns its handle. See API Reference.