Issue with Hitting subcomponent

I noticed that when shooting the Enemy, if you hit its “nose” collider it has no effect on the enemy health. I’ve fixed this in my project by using using GetComponentInParent rather than just GetComponent. You may want to update this also, especially if you have many children objects that may block the raycast from reaching the base collider.

Not sure if there’s another way, but this seems to work.

2 Likes

Privacy & Terms