Hi, i have a problem. I made an animation (just a simple animation where a cube slides up and then down) and i made a script where it activates if the player enters the trigger.
Here is the script.
var Door : GameObject;
function OnTriggerEnter (other : Collider)
{
var contact : String = other.transform.name;
if (contact == "Player")
{
Door.animation.Play("doorAnimation");
}
}
So i put a collider on the door and make it a trigger, but now when i try to walk into it, nothing happends.
And the most fun part of this is that i had it working before, then i did some other stuff in my project (nothing that could affect my animations etc) and it stopped working…
Anyone can give me some help?