I have one problem. I have a model of zombies, and I need to function as an "instant death collider. But when you give in to the model, the model is destroyed, and when I give it to an to object, that object join the zombie, player suddenly everything starts to fall, or the collider will not work.
Just to clarify, do you mean that the player should die instantly when he touches a zombie? The OnControllerColliderHit function gets passed an object that gives details of the object that was hit. You could give all the zombies their own tag and check for this on the player script with code like this:-
function OnControllerColliderHit(hit: ControllerColliderHit) {
if (hit.gameObject.tag == "Zombie") {
// Die.
}
}
A little different, I need when “Player FirstPerson” touches the object in which the script, becomes this:
LevelLoadFade.FadeAndLoadLevel(Application.loadedLevel, Color.white, 2.0);
please help