Skip to content
Liam Robotica edited this page Jun 27, 2017 · 3 revisions

Welcome to the AvatarComponents wiki!

Manager_Avatar - Coming Soon

  • This will be the entry point for these scripts and will manage inter-script dependencies beyond the EyeGaze System.

Manager_EyeGaze

This is currently the entry point / main script.

Editor:

You will set two variables:

  1. the Transform reference to your preferred forward facing direction. In essence, the head's transform or the head's bone transform. This way, if the head moves (through animation or HMD control) the forward direction is always known.
  2. the Transform references to your character's Eyes. This is an array value to accommodate multiple eyes.

Internal:

This script will create and add additional components and gameObjects to the character.

  1. Controller_Interest
  • The manager retrieves the target information that this component cycles through. This Component controls what object will be the current focus of the avatar by maintaining a list of focus objects and their points of interest.
  • This component creates a frustum object whose collider is used to add and remove objects from those lists. Object_Frustum is the component that holds the onTriggerEnter & onTriggerExit functions.
  • The component then uses two coroutines to cycle through the objects and their points.
  1. Controller_Focus
  • The manager tells the eyes to lookAt the focus target this component creates.
  • The manager passes the target information from the interestController and tells the focusController to move to that position. This Component creates a gameObject as a focus target, maintains its position through a coroutine, and allows for one external call moveTo() to move the target.
  1. Controller_EyeBlink
  • This currently only grabs a reference, the component must be added in the editor...
  • The manager uses the reference to externally trigger a single eyeBlink animation. This is currently a stand alone script and needs to be manually added. This component randomly animates single and double blink animations.
  • For 3D models, it requires a reference to the blink related blendshape index numbers.

Object_OfInterest

This is the component you add to GameObjects that you want the avatar or character to look at.

  • The component requires a Collider to be present on the gameObject, if none are found it will default to a BoxCollider.
  • With this component, designers can designate child object transforms as unique points of interest the avatar can look at, or simply check the bool value to use all child object transforms. If no child objects exist, it will default to the object's transform position.