I am trying to make it so that an enemy will damage a player when it touches the player. The enemy object has a character controller component. The enemy has a child object that has the skinned mesh renderer component, which we will call the model. I added a mesh collider to the model, and set it to be a trigger. I also added a script to the model to log when a hit occurs.
When the enemy swings it’s arms to hit the player, nothing triggers. If I run directly in to the enemy, the trigger occurs. This sort of leads me to believe that perhaps the mesh collider is not animating along with the rest of the enemy, and perhaps I have not set it up correctly to do so.
Here is the enemy model, wish mesh collider.
Does the mesh collider animate along with the mesh renderer, or is there a way to make it do so? I need for when the ogre swings it’s hand or its weapon at the player, for it to trigger a damage hit on the player. Any help would be appreciated. Thanks!