Pathfinding fixes:

- determining if a character is close enough to a waypoint works now, even if the character is too short for its collider to overlap with the wp (e.g. crawlers)
- enemies can drop down from platforms
- an extra waypoint is placed at the middle of stairs to prevent characters from choosing a waypoint on a platform above the stairs as the starting point of their path
This commit is contained in:
Regalis
2016-11-23 22:20:20 +02:00
parent 9061f0e53a
commit 9d1d64901a
4 changed files with 53 additions and 8 deletions
@@ -225,9 +225,7 @@ namespace Barotrauma
{
movement = MathUtils.SmoothStep(movement, TargetMovement * walkSpeed, 0.2f);
if (movement == Vector2.Zero) return;
IgnorePlatforms = (TargetMovement.Y < -Math.Abs(TargetMovement.X));
float mainLimbHeight, mainLimbAngle;
if (MainLimb.type == LimbType.Torso)
{