- Home /
Setting off animation with trigger
Im trying to figure out how to make doors open when a trigger is hit. So i shoot a button and it opens one door. Then a different button sets off a different door animation. If not willing to tell me how....could you at least point me in the direction of a good tut. Thanks.
Answer by Loius · Oct 09, 2010 at 03:18 AM
If you have door animations then use for the button something like
var door : GameObject;
function HitByBullet() { door.animation.play("open") }
When you determine that the button has been hit, call the HitByBullet function.
If you haven't figured out how to tell if the button was hit yet, check the scripting reference for OnTriggerEnter, OnCollisionEnter, and Physics.Raycast; one of those should make you happy.
Your answer
Follow this Question
Related Questions
Presure plate that triggers an animation 1 Answer
Sliding door animation question. 3 Answers
Triggering door animation with collider 2 Answers
Trigger door animation with external trigger 1 Answer
importing exporting Animation help. 1 Answer