Home Forums Software Development [Solved] GazeAwareComponent not being received when close to character Reply To: [Solved] GazeAwareComponent not being received when close to character

Jenny [Tobii]

Hi Joe (@joeval),

On the GazeAwareComponent, there is an option for “Show Projected Bounds”. Enable that to get a visual representation how the NPC character is projected to Screen space by default by the EyeX Framework for Unity. This might give you some better idea what goes wrong.

It is hard for us to create a good-enough default implementation in the EyeX Framework for using EyeX interactions like GazeAware since we do not have access to source integration with the Unity Engine itself. So the implementation we have is quite crude and does not scale well performance vice. But also, there is not much flexibility given with the current EyeX components, with no options to customize them in the Unity Editor. Right now, the only option for a developer like yourself to get control over the world-to-screen projection used by EyeX is to customize the component in code, by inheriting from the GazeAwareComponent class and overriding one of the following methods: GetProjectedBounds() or GetRenderer(). These methods are implemented in the GazeAwareComponent’s parent class EyeXGameObjectInteractorBase.

By default, the algorithm to calculate the projected bounds of a game object with an attached EyeX Behavior component works like this:

1. Try to define an axis-aligned bounding box in World space for the game object:
1.1) Use the game object’s BoxCollider as bounding box. Go to 2.
1.2) If no BoxCollider, use bounding box of the game object’s Renderer. Go to 2.
1.3) If no Renderer on the game object itself, use the Renderer of one of its children. Go to 2.
1.4) None of the above worked. Exit the projection calculation with an exception.
2. Given an axis-aligned bounding box, project its corner points to the Screen and find an axis-aligned rectangle in Screen space that fits all of the projected corner points.

I hope to be able to provide better customizable EyeX components in the next EyeX SDK for Unity release. But there is much more focus internally on creating code samples on how to use the EyeX data streams to create the kind of eye-tracking interactions implemented in Assassin’s Creed, the Hunter and such games.