- Home /
My charector doesnt die when i collide with the enemy
i am creating a horror game and i wanted my charector to die when i collide with the ghost/enemy. i looked up a script and found one and put it on the enemy and it didnt work! i dont know if it is the script or somethig with the collision because it looks like the enemy is going inside of my fps controller! one last thing i have a script to make the enemy folow me.
How is anyone going to help you when you haven't posted what your script is?
Does the enemy and/or player have a $$anonymous$$esh Collider on it? Change it to another collider (since it's an fps change to a capsule).
Answer by robertbu · May 26, 2014 at 01:13 AM
Character Controllers don't get or receive OnCollision* callbacks. On a script on the character controller, you can use OnControllerColliderHit() to get a callback of a collision.
Answer by mattehunter1 · May 26, 2014 at 04:51 PM
Try making a enemy trigger that deletes the player and then plays an animation
i dont know that much scripting could u give me a tutorial for the enemy trigger and animation
Your answer
Follow this Question
Related Questions
How to check collision with specific object 1 Answer
Objectives/Goals 1 Answer
How to reproduce a sound when my character collide 1 Answer
Coconut collision detection script 0 Answers