Target Setup
Creating A Target
To make an object a target that can be tracked by radar, add a Trackable component and customize the settings in the inspector.
Activating/Deactivating A Target
To activate or deactivate a target in your scene, toggle the Activated checkbox in the inspector, or use the following code:
When deactivated, a target won't be trackable by radar.
Setting Up Waypoints
Typically, a waypoint is a type of target that can always be detected by a radar, regardless of that radar's range. To create this:
Add a new game object to the scene in the position where the waypoint should be found
Add a Trackable component and customize the inspector settings
Check the Ignore Tracking Distance checkbox in the inspector
When you ignore tracking distance, the waypoint appears on radar regardless of the radar's range.
You can use a Game Agent Trigger to toggle the activation of the waypoint so that it becomes deactivated when the player is within a specified range. Do this by adding the waypoint Trackable's Activated setter to the events in the inspector of the Game Agent Trigger component.
Subsystems
Setup
To setup subsystems on a vehicle, you can designate a Trackable object to be a child (subsystem) of another Trackable, by assigning it to the Child Trackables list in the inspector of the other Trackable component.
Check out the section on Target Selectors to find out how to specifically target subsystems.
Adding Module Subsystems
Sometimes you might have a module that is loaded on a vehicle that you want to appear as a targetable subsystem of the vehicle.
To set this up:
Add a Trackable Module Linker somewhere on the vehicle
Open the inspector and set the Parent Trackable component in the inspector to the vehicle's Trackable component.
Now, any Trackable on any module loaded onto the vehicle will be added to the vehicle Trackable's Child Trackables list, as a subsystem.
Last updated