Ignore non-hard bodies for npc steering (#12990)

This commit is contained in:
metalgearsloth
2022-12-12 21:20:13 +11:00
committed by GitHub
parent bbfa8b5ae6
commit 666d81a869
3 changed files with 16 additions and 13 deletions

View File

@@ -39,7 +39,7 @@ public sealed partial class NPCCombatSystem
var obstacleDirection = pointB - args.WorldPosition;
var obstacleDistance = obstacleDirection.Length;
if (obstacleDistance > idealDistance)
if (obstacleDistance > idealDistance || obstacleDistance == 0f)
{
// Don't want to get too far.
return;