# Eye Controller

**Eye Controller** is a separate component for adding automatic eye movements and blinking to your characters. It's designed to work alongside the [**LipSync** ](/lipsync-pro/concepts-and-components/lipsync.md)component while sharing a [**Blend System**](/lipsync-pro/concepts-and-components/blend-systems.md), but can also be used on its own.

## Using the Eye Controller Component

The Eye Controller component is simple to set up. Like the **LipSync** component, it can be attached to any GameObject, but is usually put on the root object of the character it controls. After adding a new **Eye Controller** component, you will need to assign a **Blend System** to it. This is done by choosing one from the dropdown.

![](/files/-M7mfPdOpjLtKoG8ydKm)

{% hint style="warning" %}
**Bare in mind that Blend Systems can be shared.**

If more than one **BlendSystem** user (e.g. LipSync or Eye Controller) exists on the same GameObject, and the same Blend System is selected for both then the **exact same instance of the Blend System will be used**, and its settings (including meshes, etc.) shared between both components.
{% endhint %}

![The Eye Controller Editor](/files/-M7mgD3yda2Kh5MVRY_m)

Each of Eye Controller's features can be enabled or disabled independently. Additionally, Blinking and Random Looking can both function in either **Classic** or **PoseBased** modes.

## Blinking

![](/files/-M7mgNSWJJPwtIOAqpxl)

This feature will add a simple random blinking effect to your character. In Classic mode, two [blendables](/lipsync-pro/concepts-and-components/blend-systems.md#blendables) are chosen - one for each eye.\
Pose-Based mode replaces these with a single LipSync-style **Pose** that will be used in their place, allowing for the use of bones as well as an arbitrary number of blendables.

**Blink Gap** controls how often blinking occurs. The gap between each blink will be a random number of seconds between the two values here.

**Blink Duration** is the length of time, in seconds, each blink takes. The blendables/pose will be blended to over the first half of this time, then blended out over the second.

## Random Looking

![](/files/-M7mghlQXtFH-tV-4DF1)

{% hint style="info" %}
Enabling this feature will also show the 'Looking (Shared)' box.
{% endhint %}

This feature is used to add a randomised looking around effect to help make characters look more alive and interesting, even when there isn't anything specific for them to be looking at.\
\
In either mode, the only option in this section is **Change Direction Gap**. Much like the Blink Gap, this is the range that controls how often the eyes will turn to look in a new direction.\
The rest of the options are contained in the 'Looking (Shared)' section.

## Look At Target

![](/files/-M7mgyKUOnrvb3UWizFx)

{% hint style="info" %}
Enabling this feature will also show the 'Looking (Shared)' box.
{% endhint %}

This feature is used to make the eyes point at a certain position in the world. For example, it can be used to allow for eye contact in VR games or FPSes, or for making a player character look at objects they can interact with.

{% hint style="danger" %}
Note that this feature is not available when using Pose-Based mode for Random Looking, as it relies on having objects it can point towards a target.
{% endhint %}

**Target** is the Transform that the eyes will point towards.

**Use Auto Target** will enable or disable the automatic target-finding feature. This will make the eyes look towards the closest Transform that has a certain tag. When enabled, it reveals more options:\
\
**Auto Target Tag** is the tag that identifies possible targets, and **Auto Target Distance** is the maximum distance between the character and a target. If a target is further away, it won't be looked at.

**Look At Amount** is a 0-1 value that can be used to smoothly enable or disable Look At Target. At 0, any targets (manual or automatic) will be ignored, and Random Looking will be used if it's enabled. At 1, Random Looking will be ignored, and the eyes will be looking straight at the target.

## Looking (Shared)

![](/files/-M7mhSdLE67dzUDtXuiM)

These options are shared between both Random Looking and Look At Target.\
Only the **Eye Turn Speed** option is available in both Classic and Pose-Based modes. Higher values will make the eyes turn faster.

### In Classic mode:

**Left/Right Eye Look At Bone** are Transforms that represent the eyes. They will usually be a set of bones in the character's rig that control the eyes or, less commonly, the actual eye meshes themselves.

**X/Y Axis Range** controls how far along each axis the eyes are allowed to turn. In Random Looking mode, the random rotations will be within this range, and in Look At Target mode, the eye rotations will be clamped to avoid the eyes turning past these limits.

**Eye Look Offset** is an Euler angle rotation that will be applied to each eye. In Look At Target mode, the eye transforms will be pointed at the target along their local Z axis. If the bones/meshes are rigged differently, you can use this to counteract that, by rotating them 90 or 180 degrees back.

### In Pose-Based Mode

The previous options are replaced with 4 poses: **Looking Up, Looking Down, Looking Left** and **Looking Right**. These are blended between in Random Looking mode, with **Looking Up** being eyes up at their vertical limit, etc.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rogodigital.gitbook.io/lipsync-pro/concepts-and-components/eye-controller.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
