Im making a mulitplayer shooter and when i shoot it fires out of the barrel using the spawnpoint i made but then it shoots really fast out of another location please help!
EDIT!!!! i tried changing the code to getbuttondown but it still fires out of the barrel plus the mag!
This is my code:
A few points (will look at it more if none of these work): 1. Is the script applied to the gun? If not, do so. If it is, try using transform.position + Vector3(Insert Length of the barrel / 2). This will make it come out of the end. Or you could just have an empty gameObject at the end of your barrel. 2. Try putting var before the first clone perhaps? 3. I'd be tempted to use GetButtonDown instead of GetButton, if you want the player to click for each shot.
answered May 25 '11 at 05:24 PM