areaofinterestray - eisclimber/ExPresS-XR GitHub Wiki

AreaOfInterestRay

Class in ExPresSXR.Experimentation.EyeTracking

Inherits from UnityEngine.MonoBehaviour

Summary

Casts a ray that can be used to detect 'AreaOfInterests'-Components, mostly used for EyeTracking but can be done with arbitrary Position- and Rotation-InputActions.

Supports bouncing (e.g. with Mirrors). The number of bounces is determined by '_numAOIBounces'. For objects to bounce they must be in the 'AreaOfInterestBouncer'-Layer and have an 'AreaOfInterestRayBouncer'-Component attached to them.

public class AreaOfInterestRay : MonoBehaviour

Fields

Name Description
NO_AOI_DETECTED_ID AOI Id used when no hit is detected.
OnFocussedAoiChanged Emitted when the focussed AOI changes.
Returns following values (in order): oldAOI, newAOI, focusDuration, newStartTime

Properties

Name Description
AoiFocusDuration Time the current aoi (or none) was focussed.
AoiFocusStart (UNIX) Start Time of the focus on an aoi.
BounceTracePath List of detected AOI positions including bounces on configured reflective surfaces.
Begins with the eye position and ends on a AOI hit, if any.
CurrentEyeDir Accessor for the current eye looking direction.
CurrentEyePos Accessor for the current eye position.
CurrentRaycastHit The raycast on the focussed AOI or the last hit after bouncing
FocusedAoiId Currently focussed AOI id.
HasAOIFocussed If an AOI is currently focussed.
⚠️ **GitHub.com Fallback** ⚠️