This allows objects to react to being looked at. The behavior of the gazed upon ("gazeable") object can be customized.
1. Add `Gazing.cs` to your main camera (or to `OVRPlayerController > OVRCameraRig > TrackingSpace > CenterEyeAnchor` if you are using Oculus VR glasses). There are not many options to this script, you can switch on or off the display of rays.
2. Add `IGazable.cs` simply to your assets (no need to add it to the scene)
3. Use `FearfulCube.cs` as an example to build your own behaviors
## Details
The technique behind this is Raycasting. This means the _gazing_ object shoots out "rays" every Physics-Frame (`FixedUpdate()`) and if it hits a collider it checks if the hit object has a component on it, that implements the Interface `IGazable`.
A interface is simply a common set of commands a thing needs to implement. In our case it is defined as follows:
```csharp
// IGazeable.cs
publicinterfaceIGazeable
{
voidAct(GameObjectgazingObject,floatdistance);
}
```
Using this we could implement various own functions that all need to use the same function name and definition but can differ in behaviour. E.g. The FearfulCube moves away into x direction:
Debug.LogFormat("Blush! {0}, leave me alone",gazingObject.name);
}
}
```
The common element here is the `, IGazable` in the class definition on top. This is our promise that we will implement all of the methods mentioned in the `IGazable` Interface definition above (which in this case is just `Act(GameObject gazingObject, float distance)`).
The cool thing about this is, that in `Gazing.cs` we now just have to do this:
```csharp
// Get Component that inherits from IGazeable interface you can easily implement your