- Home /
need help with swing sword script
mines not relly a good script because im just learning how to use unity. it's one where an object(the sword) swings with the script on it, but the problem is i dont know how to make it so it will only do it when i click with the mouse and then end a little bit later thanks, heres the script:
var speed = 5.0;
function Update () { transform.Rotate(6, 3, speed*Time.deltaTime, 3); }
$$anonymous$$ake it an animation, ins$$anonymous$$d. $$anonymous$$uch easier to customise.
Also, what, exactly, does that code of yours there do? I wasn't aware that there was an overload for transform.Rotate that took 4 numbers, so the '3' at the end must be getting cast into a 'Space' enum!
Your answer
Follow this Question
Related Questions
OnCollisionEnter Issue... 1 Answer
How to unsheathe sword 0 Answers
Slowly rotating an object while pointing at mouse 0 Answers
weapon sound effect (sword) 2 Answers
How do I make a sword swing? 2 Answers