- Home /
Best way to shoot physical bullets?
I'm making a first person shooter that has bullet time (slow motion) mechanics, and I'm wondering what method of shooting bullets would be best for my case.
Using Rigidbody.AddForce
makes the bullets fall quickly and not feel like bullets.
Using raycast works, but it's kinda weird to not be able to see the bullets when in slow-mo.
Using Transform.Translate
kinda works, but it doesn't detect collision.
I want to spawn bullets in front of the gun and have them move forward at a static speed without falling while still detecting collision.
Using Rigidbody.AddForce makes the bullets fall quickly and not feel like bullets.
You probably need to tweak the parameters of the Rigidbody and the force you apply
The Rigidbody class does not have tons of parameters ;)
Answer by hsgaminators · Dec 06, 2021 at 12:26 PM
The most used method for shooting bullets is using Raycast. You can detect your target and collision using raycast and shoot realistic-looking fake bullets along the line of ray.
Answer by GREYSETH · Dec 07, 2021 at 09:01 AM
Turns out that using Rigidbody.AddForce
with ForceMode.VelocityChange
and a force of about 3000-4000 multiplied by Time.unscaledDeltaTime
works pretty well.