TLOU2-style TPS game Aim visibility in TPS system (camera-center hitscan)

Problem: Aim visibility in TPS system (camera-center hitscan)

I’m working on a TLOU2-style TPS game and running into a fairness issue with combat.

From my camera (image 1), you can clearly see I’m aiming at another player. But from that player’s perspective (image 2), all they see is my arm/weapon, with nothing that clearly telegraphs I’m aiming directly at them.

The issue is that the hitscan/bullets originate from the shooter’s camera center, not from the weapon or visible arm. This means a player can take damage without any way to see or anticipate that they were being aimed at, which feels unfair.

Important constraint: keeping the raycast origin at the camera center is the priority. Camera-center hitscan gives the most accurate, responsive aiming (what you see is what you hit), avoids issues where the gun barrel is blocked by geometry the camera can see over/around, and prevents desync between crosshair position and actual hit registration. Abandoning it should be the last resort, only if no other fix works.

So I’m looking for solutions that keep camera-center raycasting intact while fixing the visual telegraphing problem. Options I’m considering:

  • Improving the third-person arm/weapon rig so it visually reflects the real aim angle more accurately (even if the raycast itself still comes from the camera)
  • Adding a visible aim indicator (Body Tilt, weapon tilt) that better communicates where the shot is actually going
  • Reviewing IK/animation blending so the arms track the aim direction more convincingly at all angles, especially close-range

Has anyone dealt with this? Looking for ways to fix the visual feedback without touching the raycast origin.

3 Likes

What about just using two raycasts?

Keep the main raycast from the camera exactly as it is. Wherever that raycast hits becomes the target point. Then do a second raycast from the weapon’s muzzle to that point. If the second raycast hits world geometry before reaching the target, don’t register the hit. If it reaches the target without hitting anything, the shot goes through.

2 Likes

Like @OnaticDev said, I can’t think of any other way to keep the camera hitscan origin besides just, creating another raycast?

I know Counter Strike uses the player’s head as the origin and not the gun muzzle (to prevent clipping the gun into the wall and creating all sorts of jank).

What if you validated a line-of-sight with the head raycast and used it to fire an obstructed shot, and then just used the camera origin for everything else?

As for a visual indicator, i’ve seen some games (can’t remember off the top of my head) use a white dot to communicate that your shot is obstructed.

2 Likes

tbh if Counter Strike uses it, it’s probably a pretty solid approach.

I think Counter Strike uses the head because it’s a first-person shooter. It makes sure your shots line up with what you can actually see and it prevents players from hiding behind a wall with only their gun sticking out while still being able to shoot.

I don’t think that approach is as useful for your third-person shooter though.

Using the head (or any other part of the player’s body) gives you a physical reference as to whether or not your opponent (or whatever you’re shooting) has a visible line-of-sight to you. It would solve OP’s concern of players being shot with zero opportunity to shoot back.