Hii,,
I am new to unity as well as scripting plz bare me..
i am trying to play an animation of my main player when i click on the other object...
for instance i am trying to do script(Java only) to pick up an object from ground..
i have a small cube on my plane now i want to play my pick up animation (Which is on my player)& collect that cube when i click on that cube...
plz plz plz help me out..
There is another problem when i used that animation on my player using following clip
if ( Input.GetMouseButton(2) ) {
animation.Play("Pick up");
}
}
then it play animation only when i keep press the said button
Actuly i want to play full animation when i click once.
(Sorry for my bad English as it was not my language)
↧