Skip to content

Follow objects and gaze

Nawhal Sayarh edited this page Aug 1, 2019 · 2 revisions

In Greta's environment, there is nothing but the virtual agent. However, if this virtual agent does not know where the Unity objects are, it cannot interact with them. So one of Greta Unity's features is to keep track of some given objects so that their position, rotation and scale is replicated and updated in Greta's environment.

Greta Object Tracker in Unity

You need to link the CharacterAnimation_Single_Autodesk script (in the virtual agent) to the script in Character Anim Script. Then, you have to chose which objects in the Scene you want to appear in Greta's environment and change the Tracked Objects list accordingly. If you want Greta to follow an object with her gaze, you will have to link this object in Object To Follow With Gaze and chose the Gaze Influence in the dropdown list (eyes, head, shoulder, torso or whole) to indicate how you want the agent to look at the object : with her eyes, with her head and eyes, with her shoulders, head and eyes, with her torso, shoulder, head and eyes or with her whole body.

Every time one of the tracked objects moves, a message will be sent to Greta so that it is updated in its environment.

Every time the gazed at object moves, a message will be sent to Greta so that it is updated in its environment and Greta's gaze changes.

/!\ Careful : if a gaze at object moves too much, Greta might not hold on and crash.