📪TrackPoint
Component and Prefab
Last updated
Component and Prefab
Last updated
The TrackPoint is a component that stores an index of where it is in the track points list. This list can be seen on the TrackManager component and MUST be filled.
This component is used when querying triggers on the LapTimeTrackingObject component to detect which track point was passed.
The object that this component is attached to MUST have a collider marked as a trigger. This trigger represents the places that objects must pass through. For example, the start line, finish line or any other pass points around your tracks.
You can either add this component to existing objects, create your own or simply drag in the provided TrackPointPrefab into your scene which has everything set up.
NOTE: There are two variations of the TrackPointPrefab used for either 3D or 2D projects. These are called the TrackPoint3DPrefab and TrackPoint2DPrefab respectively. Use the appropriate one for your project.
The TrackPoint3DPrefab and TrackPoint2DPrefab already contain the script and colliders required for Complete Time Trial System to work automatically with the TrackManager and LapTimeTrackingObject components.
Adjusting the dimensions of the track point trigger colliders on these is the only setup that is needed to suit the needs of your individual tracks.
NOTE: A track point is NOT the same as a sector. You can think of a track point as two separate positions on your track, and a sector being the actual distance between those two points.
The number of track points around a given track can differ from the number of sectors based on the track type you have selected. If you have a track with 3 track points A, B and C then the arrows between them represent the different sectors around the track.
Use the example below to see how the type of track can change the number of sectors with the same amount of track points.
Circular Track | Linear Track |
---|---|
3 track points
3 sectors
3 track points
2 sectors