I am making a FPS Game and I don’t know how to make the machine gun shoot bullets!
This will probably be more complicated than you expect now ![]()
It is a very wide question in general.
- You need to track the position of the tip of the machine gun and direction it’s pointed at. I don’t know how other people do it, but you could for example attach a dummy gameobject to the very tip of your machine gun. Whenever the gun is moved, position and rotation of that game object will tell you where exactly you need to “shoot bullets” from.
- When player is shooting bullets, you’ll need to give some kind of visual feedback of bullets “flying”, you could use e.g. particle system for that.
- You will likely want to add some effects on what happens when gun is firing, like players hand would be bouncing from the force. Scripting is used to do that.
Have a look at the FPS tutorial on the unity site:
http://unity3d.com/support/resources/tutorials/fpstutorial
That only tells me how to make a rocket launcher.
Lil off topic but is it bad practice to use lense flares as bullets? such as for a plasma rifle?
Not sure about yr new question but he ‘FPStutorial’ is the perfect place for u if u want to learn it in detail. last week i was stuck at the same place as u are.and that tutorial is a BIG help.