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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user