From 143add636f432c57f917b608179f48385c8fc28b Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 15 May 2023 14:12:05 +0200 Subject: [PATCH] Fix weight of grabbed objects without handles --- .../HumanoidControl/Scripts/Interaction/HandInteraction.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs b/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs index cb42708..1b93e21 100644 --- a/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs +++ b/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs @@ -678,6 +678,9 @@ namespace Passer.Humanoid { } RigidbodyDisabled.ParentRigidbody(handRigidbody, objRigidbody); + if (handRigidbody != null) + handRigidbody.mass = objRigidbody.mass; + HumanoidNetworking.DisableNetworkSync(objRigidbody.gameObject); if (!humanoid.isRemote) @@ -855,6 +858,8 @@ namespace Passer.Humanoid { if (grabbedHandle != null) LetGoHandle(grabbedHandle); + + handRigidbody.mass = 1; } this.grabbedRigidbody = false; }