|
Hi. I know this might sound silly... I've read the FPS tutorial and all sorts of tutorials... But when I shoot, the bullet stays at the spawn point of the gun. And you shoot millions of them as long as you keep holding on the mouse button. Here's my script:
Please help!
(comments are locked)
|
|
Hi, It should be
Also does your bullet prefab have a rigidbody attached? Maybe thats why it doesn't move?
(comments are locked)
|

at the moment when you hold the mouse button it instantiates 1 bellet every 0 seconds thats why you get thousands, you try instead of 'if(Input.GetButton("Fire1"))' 'if(Input.GetButtonDown("Fire1"))' this means you click every time to fire a bullet but is you want to hold down to fire quickly (but not so quickly) you could try using a Coroutine to run the script every 0.1 seconds.