So, a player has sword, that sword’s child has a trigger collider, the sword has a script which has a function ontriggerenter that applies damage to the collider that it hit. There is an rigidbody enemy that has a child, that child has a collider.
2 Problems :
- Sword script never gets activated because the object sword doesn’t have a collider, it’s child does.
- Lets say i fixed the first problem. If sword hits enemy, it doesn’t send the apply damage function to the enemy, but the enemies child, which has a collider.
Is there a way to fix these problems without putting colliders on parents, is there some script that sends the damage to the parent, not the child?