- Home /
Trigger animation OnMouseDown
Hi everyone...still a newbie here :) I'm working on an educational game and have an issue...i want the player to be animated once the games starts to an entrance (done)...and then the animation to stop (not done)....the user clicks on the door, the door animates open and then the player again is animated to enter the room....
for the door i tried this (thankfully taken from this forum)
var door : GameObject; //Assign this in the editor or in Start, find the door
function OnMouseDown() { door.animation.Play("door_anim"); }
I attached it to the door and it does nothing...also the player just keeps moving to the next waypoint without stopping....HEEEEEEEEEEEEEEEEEEEEEEELP
Your answer
Follow this Question
Related Questions
Problem getting my model to animate once mouse clicked 0 Answers
Only updating once during left mouse button being held down. 3 Answers
How to make object clickable when user enter collider ? 0 Answers
How do you check if the object that you want to destroy with a click is the right object? 1 Answer
My inventory opens and closes on left mouse click when i don't want it to. 1 Answer