Hi all,
I'm working on a small hobby project a 3rd person shooter in UE4. I want my character to be far left on the screen so I position my player camera way to the right.
When Aiming I pop up a reticle in the center of the screen.
This works for most cases but sometimes I have a clear shot at the enemy that is right in my reticle but there is some object between my character and the enemy.
As it is now I am doing a linetrace between the gun muzzle and the target so if I have the enemy in the crosshair but a barrel between the LOS from my character gun muzzle and enemy I will hit the barrel instead of the enemy.
How do you solve problems like this? As a player I kind of expect to hit what is in the reticle so I could do a straight linetrace from the camera to the reticle as this would solve how I as a player expect the reticle to work but I also want to have a guntrail from the weapon muzzle to the target and that trace would pass through the barrel or wall and that would also be odd.. If this was a multiplayer game my char would be able to hide behind a wall and still shoot the enemies and that would not be good..
I guess one way is to move the character closer to the center as that would minimize the problem but at the same time I really want the char way to the left on the screen…
Any ideas?
Thanks.