The example level is designed to have a persistent level that contains the player, and mechanisms to load and unload sublevels. As these blueprints are not tied to a specific sample, we collect them here.
The player controller (BP_XRExamplePlayerController)
In order to process the output of our object mapping, we need to set up a focus manager. You could add this component to any actor, but it makes sense for it to be on a player controller as the data is from a player’s perspective.
(Note that we also have a Throw At Gaze component here as well. It’s used exclusively in our throwing sample to enable gaze-assisted throwing.
Here we set up our default behavior for when we gain or lose focus of a component. In our samples it iterates through all primitivecomponents and sets a custom highlight using the custom stencil buffer.
Focus managers also support using filters to grab subsets of GTOM objects. This is not implemented in any of our samples.
Setting a focus target is also required to use the Throw At Gaze component.***
The scene selector (BP_SceneSelector)
The scene selector lets the user switch between the different example scenes. It can be interacted with using either gaze, or the motion controllers. If gaze is turned off, it will also work with the widget pointer.
This widget component contains gaze selectable options for changing the scene. It leverages Gaze Focusable Widgets to facilitate gaze focus.
As we want this actor to be focusable using gaze, we have a Gaze Focusable Component.
Here we test if the focused object is the widget component displaying our selection choices. If so, we forward it to the widget and figure out which panel/scene has been selected.