Hey guys, I'm pretty new to Unity and such but I've figured out quite a bit thus far. However I still need some help with a gun script/projectile firing script.
Here's what I'm at so far. I've been doing lots of work to animate this character and he fires his weapon from his arm, however, I was a bit clueless on how to start the script for a projectile or anything.
I DID make a prefab for a projectile, so I know that I need to make that, but this one script I found while looking for help(I was hoping it'd just make my life easier and I'd analyze it later, haha) merely made them appear and not go away, but not fire, and especially not fire from his arm.
I then deduced that I'd need to make the blaster on his arm a weapon which would indicate to fire said projectile and then how fast and what direction.
However I'm still clueless code-wise on a lot of this stuff.
I'm not asking for a complete code, but snippets and DETAILED explanations to help me out are extremely appreciated.
To clarify/reiterate: I just want his arm blaster to fire a projectile forward(it's side-scrolling, remember) from where he points his blaster.
And to remind: Projectile is already a prefab, so if your step-by-step help includes that, don't worry, I got that much already.
asked May 16 '11 at 02:39 AM
Check out this question: http://answers.unity3d.com/questions/10957/shooting-a-projectile-forward-in-3d-space.html
It comes down to a process like this: