- Home /
Question by
left4matt · Feb 25, 2012 at 03:04 AM ·
animation script
Sword Animation
I've been trying to make my sword animation activate on mouse trigger but ive been haveing trouble. Im new at this and havent been scripting long so can someone help me.
Comment
Answer by CanOfColliders · Feb 27, 2012 at 01:59 PM
something like (c#)
if (Input.GetMouseButtonDown(0))
YourSword.animation.Play("NameOfAnimation");
should do that.
Your answer
![](https://koobas.hobune.stream/wayback/20220613064446im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
League of legends-Dota Style moving and animating script 0 Answers
Animation layer naming convention between enemies and player 0 Answers
,Capture user input as per animation state and then play animations accordingly 0 Answers
need help with simple c# movement script 1 Answer
*.anim from Blender or *.FBX 2 Answers