# Force Field Controller

## Force Field Controller

The Controller component handles the Shield shader behavior by acquiring impacts sent through the OnHit() method.

![](https://3975174601-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAkhY-TGk1rq9Rxq3Nq%2F-MAuInYERhhh9RvzAj80%2F-MAuKzDy3G49ktSuQiij%2Fimage.png?alt=media\&token=f1a81f3f-9d50-4eca-9626-447282e962e7)

“**Fix Rigidbody**” – Enables a workaround to the Unity limitation introduced starting with version 5.0 and higher, where a MeshCollider and a Rigidbody no longer work together attached to the same object leading to an error spam in the console.

“**Field**” – A reference to a Shield object(s) to control.

“**Collision Enter**” – The shield will respond to a collision when its collider/rigid body has begun touching another rigid body/collider.

“**Collision Stay**” – The shield will respond to a collision once per frame for every collider/rigid body that is touching its rigid body/collider.

“**Collision Exit**” – The shield will respond to a collision when its collider/rigid body has stopped touching another rigid body/collider.

“**Decay Speed**” – The speed at which the current hit points are faded away. Higher decay value leads to a faster decay. Setting the value to zero will freeze the effect. You may use this feature to fine-tune the shield.

“**React Speed**” – A time gap in milliseconds at which the controller registers new hits. A zero value will remove a limitation, and a value of one will limit to one hit per second.

“**Fix** Non Uniform **Scale**” – This option is designed to help with setting a shield affected by a scaled transform.
