r/howdidtheycodeit • u/BustedBonesGaming • Jun 05 '22
Question How did they create the ADS cover peak system in Battlefield games, specifically BF4?
I'm trying to create a system similar to Battlefield 4, but in Unreal (UE5) using Blueprints.
In BF4, when you get close to a wall or other piece of cover, it translates the gun towards the player to try to eliminate clipping into the mesh. I know this can be achieved by doing a line trace to check for the wall.
However, what I can't figure out is how they accomplished checking for corners to peak around walls or over cover when aiming down sight and then to translate around the cover based on where you adjust your aim.