How to make realistic bullet spread?

I’m working on a rewrite of my gun system and I’m wondering how can I make realistic spread where the longer you fire, the more spread your gun has (with a max limit to it of course). I’m not sure what the best way of doing this is.

That’s not how it works, unless you are talking about the recoil. The longer you fire your gun, the more displaced your aiming is due to experiencing more recoil. You accomplish this effect naturally by just implementing the recoil effect itself. You impulse the camera on each fire, and this impulse is done repeatedly if the player fires repeatedly. You don’t need a separate system for increasing “spread.”

1 Like

Ok, but my recoil system just impulses the camera to one fixed spot the whole time, It doesn’t increase the recoil as im firing, So I’m just wondering how I can do that?

I would look into how your recoil system works. If it’s just setting the camera offset/CFrame, it’s definitely not correct. Many recoil system use a mathematical spring (look for a spring module) to control the camera offset, so applying more impulse in a short period causes the spring to stretch further, making your camera feel more recoil. Also, the randomization should come from the initial impulse so that in a prolonged fire the camera will deviate and sway away instead of being fixed to a single spot like you said.

If you don’t want to use a spring module, you can alternatively use AlignOrientation/AlignPosition on a part to remotely simulate the recoil effect, and then copy over the CFrame offset to the camera. How you will do this is up to you, but a suggestion would be to use a WorldModel to isolate the physics.

Edit: Just found out that physics is pretty limited in WorldModel

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.