Limiting character movement when collider isn't upright (can't run at full speed if lodged in some tight space), hack-ish way of moving the collider of a character that's being dragged

This commit is contained in:
Regalis
2016-11-07 18:52:36 +02:00
parent 8c3c6355a4
commit f259f3fba4
3 changed files with 17 additions and 9 deletions

View File

@@ -60,8 +60,8 @@ namespace Barotrauma
}
else
{
collider.LinearVelocity = (GetLimb(LimbType.Torso).SimPosition - collider.SimPosition) * 60.0f;
collider.SmoothRotate(GetLimb(LimbType.Torso).Rotation);
collider.LinearVelocity = (MainLimb.SimPosition - collider.SimPosition) * 60.0f;
collider.SmoothRotate(MainLimb.Rotation);
}
if (stunTimer > 0)