Hello! I want to make my FPS game as accuratly as possible. How can I make the rigidbody.addforce so that it would be like a real gun? Like how what should I make the addforce integer to be in order to make it have a range like a pistol? Is there like a scale?
Generally at this point what you’ll want to do is read up a little bit on physics specifically line collisions and bullet momentum based on gun type. I recommend the research because you used the word pistol… there are a ton of pistols out there… a 9mm berreta will not be as powerful as a 357 magnum and a desert eagle will be more powerful than that.
There 2 ways you can do this… you can write your own physics (not recommended, but most accurate) or use the built in engine and give it a look and feel on how you want it just by eyeing everything.
What I would do is attach a rigid body to my bullet check the use gravity box and set a velocity for the object. You can technically use add force but you might get unintended results such as a bullet hitting a wall or a person could technically move it as the force would transfer. where on a velocity you can just set the velocity to 0 once it hits… then set a timer for it to destroy it’s self.
Hope this helps you out, good luck!