- Home /
Trigger Door Animation
hey guys i have a problem my door won`t open
i have a door with a amination that the door opens en i have also a game object box and i have turnd on the is trigger thing in the inspector view but when i walk into by box Called DoorTrigger My doord won`t open or wont play the animation
function (OnTriggerEnter.gameObject.Find "DoorTrigger") { if (OnTriggerEnter == "Player"){ animation.Play (take 001);} }
This is not woeking at all
Comment
Answer by efge · Jan 20, 2011 at 01:18 PM
Your script should be look like this:
function OnTriggerEnter (other : Collider) {
if (other.name == "Player") { // or other.tag == "Player"
...
}
}