0
votes

I am making an FPS game using unity 3d, I've a problem in the shooting accuracy script. Can you tell me how I can change it with a single script that shoot the bullet and include the shooting accuracy and equipped to the gun, please?

1
To make your shooting accuracy better, just practice harder, to make it worse, drink a bottle of good Scotch. - Teemu

1 Answers

1
votes

If you are currently using a raycast, you should have no problem.

If you are spawning a sphere and thrusting it forwards, I suggest you use a raycast.

Raycasts go in a completely straight line. Bullets follow gravity, and quickly fall to the ground.
You don't see bullets, they move too fast. Raycasts are invisible.
When it hits something, it sends you back the information you need. If you make the sphere go too fast, it might glitch through objects.

You can learn about raycasts here.