Manual
Highlight Trigger
Add Pass Forge Highlight Trigger next to a Highlight to switch it on without code. The trigger decides when the highlight shows, so the Highlight starts off in play mode.
| Setting | What it does |
|---|---|
| Mode | Pointer Hover highlights while the mouse, a pen or a finger is over the object. Pointer Click selects and deselects it with a click or tap. Screen Center highlights what the middle of the screen aims at, for first person interaction. Proximity highlights while the tracked object is near. |
| Camera | Camera the pointer and the screen center are measured in. Empty uses the main camera. |
| Max Distance | Farthest distance at which the pointer or the screen center reaches the object. |
| Ignore | Objects the pointer and the screen center pass through, such as the player in a third person game, whose body would otherwise stand in the middle of the screen and block everything behind it. Only this trigger ignores them; layers and other scripts are untouched. |
| Ignore Pointer Over UI | A pointer over a UI element does not reach the object behind it. |
| Only One Selected | Selecting this object deselects the other triggers that have this on. |
| Click Elsewhere Deselects | A click or tap that misses the object deselects it. |
| Flash On Click, Flash Color | Flash the object when it is clicked. |
| Tracked | For Proximity: the object that comes near, such as the player. Empty uses the main camera. |
| Proximity Area | For Proximity, where the tracked object has to be. Around Object: within Radius of the box around the object's renderers (their world bounds, lined up with the world axes), so it means the same for a crate as for a house. That box can be bigger than the object itself: a long object turned diagonally, or an L-shaped one, lights up a little before the player reaches its actual surface. An object with no visible renderer measures from its position. Sphere: within Radius of a point moved by Area Offset, whatever the object's shape. Box: inside a box of Area Size at the Area Offset, in world units and turned with the object, such as the space in front of a door. Trigger Colliders: inside the trigger colliders on the object or its children, in any shape you draw with them. |
| Only When Facing | For Proximity, the tracked object also has to face this object, so of two chests only the one the player turns to lights up. Off, the object lights up from any direction. Switched on, Facing Angle sets how far the player may turn away, in degrees to either side (45 to start). A camera counts where it looks; a character where it faces on the level. |
| Fade In, Fade Out | Seconds the highlight takes to come in and to go out. Zero switches it at once. |
| On Highlighted, On Unhighlighted, On Clicked | UnityEvents for sounds, tooltips and game logic. |
| On Clicked At (Vector3) | Called with the point on the object that was clicked or tapped, so an effect starts where the click landed: pick a Moment's PlayAt, or a Highlight's SetSpreadPoint or SpreadFrom, under Dynamic Vector3, for ice spreading from the click. |
Selecting a Proximity trigger draws its area in the Scene view and, with Only When Facing on, the Facing angle as a fan in front of the tracked object; both turn green in Play Mode while the tracked object is in.
The pointer reaches the object's colliders when it has any, 3D or 2D, so objects in front block it. Without colliders it uses a sprite's own shape (the bounds for other renderers), and a sprite with a Collider 2D drawn in front of a 2D one blocks it. Mouse, pen and touch work with both the Input System package and the old Input Manager. From scripts, Select(), Deselect() and PassForgeHighlightTrigger.DeselectAll() change the selection, and any Highlight fades with FadeIn(seconds) and FadeOut(seconds); the second switches it off once it is gone. While an object fades it is drawn on its own rather than with the others sharing its profile, which costs one more profile for the length of the fade.