The lowest point of a character collider is calculated from its AABB (works correctly now even if the collider is rotated, allowing prone characters to be dragged through stairs), dragged characters collide with stairs when climbing up, the AI of unconscious or stunned characters isn't updated

This commit is contained in:
Regalis
2017-02-17 19:27:54 +02:00
parent 1ea3044fd6
commit 99cf438ed7
3 changed files with 24 additions and 5 deletions
@@ -932,6 +932,9 @@ namespace Barotrauma
{
target.AnimController.TargetMovement = Vector2.Lerp(target.AnimController.TargetMovement, (character.SimPosition + Vector2.UnitX * Dir) - target.SimPosition, 0.5f);
}
//if on stairs, make the dragged character "climb up" (= collide with stairs)
if (stairs != null) target.AnimController.TargetMovement = new Vector2 (target.AnimController.TargetMovement.X, 1.0f);
}
public void Grab(Vector2 rightHandPos, Vector2 leftHandPos)