As stated in the title my triggers aren’t working… help please?
What am I forgetting?
Hi,
One of the colliders involved in the collision events must be a trigger collider. Otherwise, the OnTrigger* method will not get called. Check the components in the Inspector. There is an option to make a collider a trigger collider.
Did this help?
See also:
Nope, I checked the “Is Trigger” and nothing has changed.
Does the inspector operations order matter?
Your Delivery script is attached to the Package game object. In your code, your OnTriggerEnter2D method checks if the other
tag is “Package”. Assuming your car collides with the package, the car is the other
game object in this collision event. Does the car have got the “Package” or “Customer” tag assigned? If not, the if-blocks will not get executed.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.