Gaze Interaction Component
Last Updated 08/12/22
How to set up and install the GDXR VR Template Plugin.
Gaze Interaction Description
The GDXR VR Template contains an interaction method called Gaze Interaction, designed to allow users to look at specific actors and make it do something.
The Gaze Interaction component can be found as a child of the GDXRVRCharacter’’s camera component.
The gaze interaction component is active by default, if you dont need it / dont wish to use it then you can disable it inside the DA_CharacterVariables file. The GAze interaction Component runs on tick so disabling it on platforms such as Oculus Quest, Pico Neo or Vive Focus (Mobile VR will help performance).
Changing Gaze Interaction Setting
The GDXR VR Template implements a Data Asset called DA_CharacterVariables which is used to control the GDXRVRCharacter’s default settings.
In this case i have included the gaze interaction settings as they can be added to your project from the begining of development. You can find these settings in the Data Folder
Plugin > GDXR VR Plugin Content > VR Template > Blueprints > Data (Folder).
Inside the Data Folder you will find a Data Asset file called DA_CharacterVariables (the red one). Opening this up will allow you to acces the GDXR VR Characters default variables. You can see the Gaze Interaction settings bellow. (More settings maybe added in the future).
Gaze Interaction Setting And What They Do
Use Gaze Interaction
- True = This tells the component to generate and setup the correct blueprints and widget required for it to function.
- False = Setting this to False will disable the Gaze Component remoing it from the players view and Disabling the components tick, improving performance.Permenantly Display Gaze interaction
Having the gaze interaction permenantly visible can be quite distracting, this feature hides it when its not required allowing you to use two custom function to display and hide the gaze component as you require it. Hiding it also disables any interactions so there will be no miss fires. More infomation on the custom functions can be found bellow.Look Away To Restart Gaze Timer
True = After an actor has been activated the user will be required to look away from it before it can be activated again.
False = The user can permenantly look at an interactable and it will loop/repeatedly activate after the timer has completed.Gaze Line Trace Distance
This controlls how far the player can be from the interactable actor before it can be activated, higher the number the further you can be.Gaze icon Distance From Camera
The gaze icon exhists in 3D space meaning it is infront of the player. Having the icon to close to the camera can make it difficult to focus/see it. Moving it further awy makes it easier to see where your looking.Gaze Interaction Z Offset
This allows you to offset the gaze interaction moving it up or down, I have it set to -10 for personal comfort.Gaze Timer Length
How long does the user need to look at an interactable before it activates.
By default the gaze interaction component is enabled and Permanently Display is set to False. This is so the Display Gaze Interaction function can be displayed in editor.
Display Gaze Interaction Function
The “Display Gaze Interaction” function will allow you to choose when the gaze interaction component is visible/active.
You can see this in the template by looking in the BP_DisplayGazeInteractionExample blueprint. when our player overlaps the actor we set the Display Gaze Interaction to True and when they end there overlap we set it to False, this disables and hides the gaze interaction content when it’s not in use.