I have a turret that needs to reveive bullets, and needs to detect enemy nearby.
It is possible to use a box collider for the turret body, and a sphere collider for detecting nearby enemies, both colliders as components of a same GameObject?
If yes, how may I know if one collider or another received “TriggerEnter/TriggerStay” by code?
Thanks
YHou can’t have multiple colliders on one GameObject. What you need to do is to create separate gameObject for each collider. To receive their trigger / collision events, i’d suggest attaching a separate component to those colliders, relaying these events to gameObject of your choice. Or even better make use of events instead. This way you can create a reusable collisionListener, and the main turret component will hook to the listener events.