Class WaypointNavigator
Each frame, queries NavigationWaypointManager for the current waypoint position and publishes a NavigationDirectionMessage containing the signed bearing angle to that waypoint, so a compass UI can rotate to guide the participant to the next navigation target.
public class WaypointNavigator : MonoBehaviour
Inheritance
Remarks
The navigator itself is agnostic about how the waypoint position is determined.
It publishes the data through the event aggregator, keeping the navigation data source
and the compass UI fully decoupled: the UI subscribes to NavigationDirectionMessage on a
configurable ChannelKey. Multiple navigators
can therefore coexist in the same scene by assigning different channel keys in the Inspector,
each driving a separate compass indicator without interfering with one another.
A bearing angle rather than a world-space arrow position is published because VR participants wearing a Varjo headset cannot comfortably read a traditional minimap. A single rotating compass needle driven by the angle is readable in peripheral vision without requiring the participant to break gaze from the driving scenario.