Cause(s) for the targetting bug

This is more of a checklist than a list of things that might be causing the issue.

Ok, I’ve read too many Reddit posts and long-winded reports for this. Here are some common reasons it could be happening.

Stopping distance and attack distance

NavMeshAgent.stoppingDistance is larger than the attack range.

From what you have said on stream, the navmesh is kinda weird. However, I don’t think this is the issue.

Something hasn’t reset

isAttacking or isInCombat never resets, or somewhere in the process, some boolean isn’t switching.

Nav mesh agent hasn’t turned off.

The character doesn’t realise it has reached the destination. That is, the agent keeps trying to reposition itself. This is pretty common on uneven terrain. The other thing we thought might be the issue.

The collider size

Either the monsters’ or the players’ collider makes the distance check fail.

Animation issue

The animation transition doesn’t reach the event frame, so the trigger for the attack doesn’t happen due to the conditions for transitioning.

Target validity

The player’s line of sight might be failing due to the player’s colliders or terrain layer mismatch.

Time.scale

The time scale might accidentally become 0. Coroutines might stop, and yield instructions might behave differently. Movement continues because NavMesh updates aren’t tied to the attack timers.

Conclusion

Ok, this is something I don’t know much about, but from what I could gather, Web Assembly 2023 has some real issues with a lot of things that are in Eris. The AI and pathfinding, the first time loading will take a long time. Real-time multiplayer on web assembly seems to be a bad idea. And the large amount of addressables might also be a cause for the issue. Anyway, thank you to the other people in the Skarvian Testing Division for helping me test things. Let me know, David and Cathy, if it helps.

4 Likes

I am still reading and researching on this so yeah.

1 Like

man gooooooood you really went deep and again i did not read it full bcz its not for me sorry

1 Like

Thanks, yes, there are a lot of potential causes. What I’m looking for is how to reproduce the bug in-game in a predictable way. That would be the quickest way to fix it I think. Thanks very much for your research here though Skarvian it’s much appreciated.

2 Likes

Np mate, that is also what i am currently looking into. Currently no predictable pattern but usually happens around sloped or uneven terrain. And as I said i really don’t know much on the topic I just started reading today, i will see if i can find more

2 Likes