# Is Lyra doing bullet hit detection incorrectly/incompletely?

**URL:** <https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Gameplay-Ability-System, LyraStarterGame, question, CPP\
**Created:** [February 4, 2024, 5:22pm UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779 "2024-02-04T17:22:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zantezuke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zantezuke](https://forums.unrealengine.com/u/zantezuke)\
**Post date:** [February 4, 2024, 5:22pm UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779/1 "2024-02-04T17:22:53Z")

</div>

I see Lyra lauded as the “correct way” to do bullet detection but I am finding some issues. Please correct me if I am wrong because I am still quite new to the GAS.

Here is how I see the bullet detection happening:

> - Ability Activates
> 
> - ActivateAbility happens on CLIENT
> 
> - StartRangedWeaponTargeting happens only on the local player
> 
> - OnTargetDataReadyCallback happens on CLIENT
> 
> - Event On Ranged Weapon Target Data Ready happens on CLIENT (in blueprint)
> 
> - ActivateAbility happens on SERVER, same stuff happens
> 
> - OnTargetDataReadyCallback happens on SERVER, because of the client’s earlier RPC, and having bound this function in ActivateAbility.
> 
> - Event On Ranged Weapon Target Data Ready happens on SERVER (in blueprint)

The problems I see with this are:

1. This never validates the client data. The server never appears to run their own hitscans and simply accepts the client’s target data that was replicated to it.
2. Why should the client hitscan data be replicated to the server at all? I am thinking the server should run its own hitscans and use that as the end-all-be-all in case the client is lagging or cheating. The client can still run its own hitscans for feedback even if it is not correct.
3. In ULyraGameplayAbility\_RangedWeapon::StartRangedWeaponTargeting(), the local player opens a scoped prediction window with: `FScopedPredictionWindow ScopedPrediction(MyAbilityComponent, CurrentActivationInfo.GetActivationPredictionKey());`. The code specifies that this constructor is “To be called on server when a new prediction key is received from the client (In an RPC).” but the block of code that created the scoped prediction window is only ever run on the client. Is something incorrect here?

---

<div class="post-metadata">

**Author:** ![spvnn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@spvnn](https://forums.unrealengine.com/u/spvnn)\
**Post date:** [March 15, 2024, 6:59am UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779/2 "2024-03-15T06:59:36Z")

</div>

I’m having a similar problem as you tracing Lyra’s shooting logic.

Regarding 1, it is known that Lyra was designed with client authoritative hit detection. In this Youtube vid they explicitly mention that.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/1/141e2e228db656ce0b6fed18d659ac71349fbc43.jpeg "Lyra Walkthrough Q&A | Inside Unreal") ](https://www.youtube.com/watch?v=m80NJzUWq8A&t=4436)

Unfortunately, they also mention that “somewhere in the code there’s a comment that say ‘if you want to do server validation for the shots do it here’”. As far as I can tell this comment does not exist. So I’m still struggling to figure out how to convert the code to server authoritative.

For point 2, I also don’t know why that happens. Maybe it’s more convenient to just directly give the targets for replication purposes and just replace those that aren’t correct? who knows

I do wish there was a lot more detail on this aspect of Lyra… considering how it’s such a core gameplay feature…

---

<div class="post-metadata">

**Author:** ![\_2195](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_2195](https://forums.unrealengine.com/u/_2195)\
**Post date:** [March 2, 2026, 3:52pm UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779/3 "2026-03-02T15:52:01Z")

</div>

The prediction window in ULyraGameplayAbility\_RangedWeapon::StartRangedWeaponTargeting() is actually useless. A programmer from EpicGames told me that it will be removed in the next release. [https://github.com/EpicGames/UnrealEngine/commit/da33af3233954f739b4b20ca98fea0393b5d7387](https://github.com/EpicGames/UnrealEngine/commit/da33af3233954f739b4b20ca98fea0393b5d7387)

---

<div class="post-metadata">

**Author:** ![BC-Hajas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bc-hajas/32/915786_2.png) [@BC-Hajas](https://forums.unrealengine.com/u/BC-Hajas)\
**Post date:** [April 8, 2026, 10:26pm UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779/4 "2026-04-08T22:26:06Z")

</div>

Lyra will be removed?

---

<div class="post-metadata">

**Author:** ![Kendallichar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kendallichar](https://forums.unrealengine.com/u/Kendallichar)\
**Post date:** [April 9, 2026, 1:48am UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779/5 "2026-04-09T01:48:27Z")

</div>

Lyra hit detection seems simplified; may miss edge cases or lag issues.

---

<div class="post-metadata">

**Author:** ![danamaloma](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/danamaloma/32/1167197_2.png) [@danamaloma](https://forums.unrealengine.com/u/danamaloma)\
**Post date:** [April 11, 2026, 4:21am UTC](https://forums.unrealengine.com/t/is-lyra-doing-bullet-hit-detection-incorrectly-incompletely/1665779/6 "2026-04-11T04:21:32Z")

</div>

Yes— **partly**.

Lyra’s default ranged weapon setup is fine as a **sample hitscan implementation** , but it is **not fully complete for production**. In particular, Lyra commonly traces from the **camera/focus** rather than doing a full **muzzle-to-target obstruction check** , so shots can feel wrong around walls or close cover. Epic community discussion around `WeaponTowardsFocus` also notes that parts of that path are “still not fully implemented,” and people often patch `WeaponTrace()` themselves to add an extra obstacle trace from the weapon.

So the best answer is:

**Lyra is not exactly “wrong,” but it is simplified/incomplete.**  
It works as a starter sample, but if you want solid shooter behavior, you usually need to add:

- a **muzzle obstruction trace**

- better **camera vs muzzle reconciliation**

- optional lag compensation / network validation for multiplayer

Lyra itself is presented by Epic as a **sample gameplay project / starting point** , not a finished shooter framework.
