Documentation‎ > ‎

8. Collision Target Tracker

The Collision Target Tracker is an alternative TargetTracker that uses collision events, rather than trigger colliders. Where the Target Tracker will return a list of targets in range, this special tracker returns a list of targets which are currently colliding with the game object. This is handy when you want to deliver information when something bounces off another object.

Collision Target Trackers do not use a Perimeter to detect targets. Instead, these use the collider on the object they are attached to. One advantage this offers is the ability to use compound collider setups. 

The results of the component is a simple list of Target structs for use by other components, such as the FireController.

This section will familiarize you with the Editor interface and options so you can get started right away. More detail on how this system is implemented is provided in the CollisionTargetTracker Code Reference section

The number of targets returned by the TargetTracker. Enter 0 to get all targets in range. For example, if the sorting style is "Nearest" and there are 5 targets in range, and you enter "2" in to this parameter, then the 2 nearest will be returned on each check.

Use -1 to hit all targets in range.

Target Layers
One or more Unity Layers used to reduce the number of objects processed by the perimeter. Only GameObjects in these layers will be found and checked for a Targetable component.
Debug Level
Set this to control the amount of information printed to the Unity Console to aid development.