Hello,
I have an enemy character in my scene with a capsule collider for its body and a separate "pyramid" shape collider coming out of its head for the field of view. When I throw a punch at the enemy, I create a trigger cube so if there's an enemy inside the cube, I can deal the enemy damage and play an animation to show it's been hit.
The issue is when my attacks intersect with the vision pyramid, it triggers the event as if I hit the character itself!
Here's a video I made to hopefully make this clearer:
I thought that because the vision cone was a child of character with the capsule collider on it, that some how Unity was calling them the same trigger. However I made a mock-up with only cubes in the same hierarchical arrangement and the triggers were working as expected.
If you think you might know what's going on here, I would love to hear from you!
--
Something I noticed as well that I hadn't seen before was on the enemy character, inside the scene, I can see a "Play Maker Trigger Enter (Script)" Component that I have never seen before. I saw that it was some kind of Unity bug exposing hidden components but maybe it has something to do with my issue.
And maybe something else to note is that when I un-parent the vision pyramid from the character, it no longer sends the event when I attack it.
Thanks!