Which is better, shooting a bullet from camera or from the gun itself?


I was wondering if it would be a better idea to instantiate a bullet projectile from the camera in the forward direction of the player, directly to the dynamic crosshair, or if it would be better to instantiate it from the gun itself. I prefer to launch it from the camera but, will this give me any problems/difficulties in the long run, like later on? Thanks

[Edit] I also have a muzzle flash/firing animation so it does look convincing. The bullet cant be seen either (bullets don’t get seen anyways.)

It’s really up to you, but if you do it from the camera and the camera’s position is on the eye-level of the player model, then you will get things like the player model being crouched behind a car or something, with the gun being obstructed by the car, but the player still being able to shoot over it because the bullets are actually coming out from the eyes.

It’s weird as heck, but this is how most FPS games do it anyway. See any of the COD games for example.

It should not give you any problems in the long run, however I do strongly suggest you properly shoot from the gun as this will be alot easier to work with (for example if you want to create a 3rd person view or something simular)

It’s a bad idea to instantiate projectiles for bullets, period. You definitely want to use a ray cast.

For a slower projectile, like a rocket, you should instantiate it from the gun. If you instantiate it from the camera, all you will see is its back end getting smaller and smaller until it hits the target. And other players (if any) will see it coming out of your face instead of the gun. I can’t see any reason why you would want to fire it from the camera’s position when it’s just as easy and more accurate to fire it from the gun.