I am making a checkpoint system in a racing game. The checkpoint objects are have trigger colliders and I want them to only check for a box collider on a vehicle, so only a portion of the vehicle (outlined by the box collider) activates the checkpoint.
You can use tags to get specific colliders.
@sleepyfunnyfish
1- Create an empty object as a child of your vehicle, name it CarCollider
2- add a BoxCollider component to that CarCollider object
3- place that very object in a separate layer, that you create only for that purpose. (Eg. A new layer named « CarColliderLayer »)
4- make sure in the Physics tab in settings that the Checkpoint and CarColliderLayer layers do in fact interact
5- Check, in the OnTrigger method, that the collision is with that new layer. As the CarCollider is a «reserved » layer of yours, the collision detection will be very specific.