Item.SetTransform uses SetTransformIgnoreContacts to set the position of the physics body if the body is disabled. No need to update contacts when moving disabled items such as wearables.

This commit is contained in:
Joonas Rikkonen
2018-02-13 13:54:09 +02:00
parent 76f5c099ed
commit a2c898150e
2 changed files with 18 additions and 2 deletions
@@ -528,7 +528,14 @@ namespace Barotrauma
{
try
{
body.SetTransform(simPosition, rotation);
if (body.Enabled)
{
body.SetTransform(simPosition, rotation);
}
else
{
body.SetTransformIgnoreContacts(simPosition, rotation);
}
}
catch (Exception e)
{