Advertisement

3:d person how do aiming good?

Started by July 13, 2021 09:59 AM
6 comments, last by LorenzoGatti 3 years, 5 months ago

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.

If the player can't hit the target, make the reticle red, or somehow ghosted, make clear it ain't gonna work…
You could also outline or alpha the barrel, to show what will be hit.

Advertisement

m_waddams said:

If the player can't hit the target, make the reticle red, or somehow ghosted, make clear it ain't gonna work…
You could also outline or alpha the barrel, to show what will be hit.

Hi, thanks. I also thought of this but I want the player to feel the reticle is what the character sees so if it is LOS to the reticle it should hit. Maybe the only solution to make this work “correctly” is to move the camera so the player is very close to the center (and if I want the char far left go with your solution). Hmm?

I don't see an other solution. If you shoot from the camera you would also need to use the camera for hit detection, and see how far you can display the muzzle trail.

Well,

I guess this is why most 3rd person games have the character near the center of the screen ?

I actually took a close look at Outriders how they handle this and they spawn a small extra reticle X where the shot will hit if the path between the gun and original reticle is blocket. Pretty nice solution actually.

So I will move my char closer to the centre and if trace is blocked spawn a small cross there.

Thank you for your input ?

There is no truly good way to do aiming in a 3D third-person game. It's always going to be awkward and inaccurate compared to a first-person game or a 2D game.

You can however mitigate the problem by giving the player a weapon with a laser sight. That way the player can always see what they're going to hit before they start shooting.

Advertisement

a light breeze said:

There is no truly good way to do aiming in a 3D third-person game. It's always going to be awkward and inaccurate compared to a first-person game or a 2D game.

You can however mitigate the problem by giving the player a weapon with a laser sight. That way the player can always see what they're going to hit before they start shooting.

It need not be an actual “laser sight” that merely projects threatening red dots on surfaces. A high tech HUD that overlays a crosshair on the player's view can display many other things:

  • supplemental crosshairs, as hybris6 suggests
  • a line (normally invisible with a real laser sight) between the gun barrel and the target, both reliably included in the main camera field of view
  • numbers ("24.5 meters") and indicators of obstruction
  • small windows with a view from a gun-mounted camera

I'd try to err on the side of redundancy; to separate the two usually almost coincident tasks of seeing that the gun is aimed properly and seeing whether the target has cover different tools should suit different players and different situations.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement