Ongoing C++ Gameplay Example Series: Making a Survival Game

@coyoneda It’s common to do multiple linetraces, one comes from the camera and does the actual damage, the other comes from the muzzle location of the gun and is used for cosmetic things like tracer , making it look like there is a bullet coming from the weapon. This helps with player standing next to a wall or behind cover, if the actual linetrace came from the gun chances are it would get blocked by something, but because it comes from the camera you only need line of sight.

2 Likes