diff --git a/Runtime/HumanoidControl/Scripts/HumanoidControl.cs b/Runtime/HumanoidControl/Scripts/HumanoidControl.cs index ef3eddc..bb17943 100644 --- a/Runtime/HumanoidControl/Scripts/HumanoidControl.cs +++ b/Runtime/HumanoidControl/Scripts/HumanoidControl.cs @@ -2085,7 +2085,7 @@ namespace Passer.Humanoid { hitNormal = Vector3.zero; } - public bool IsMyRigidbody(Rigidbody rigidbody) { + public virtual bool IsMyRigidbody(Rigidbody rigidbody) { return rigidbody != null && ( rigidbody == humanoidRigidbody || diff --git a/Runtime/HumanoidControl/Scripts/Physics/HandSocket.cs b/Runtime/HumanoidControl/Scripts/Physics/HandSocket.cs index a99b380..7993853 100644 --- a/Runtime/HumanoidControl/Scripts/Physics/HandSocket.cs +++ b/Runtime/HumanoidControl/Scripts/Physics/HandSocket.cs @@ -13,17 +13,17 @@ namespace Passer.Humanoid { /// This is the HandTarget of the hand to which the socket is attached public HandTarget handTarget; - protected override void MoveHandleToSocket(Transform socketTransform, Handle handle) { - DebugLog("MoveHandleToHand"); + //protected override void MoveHandleToSocket(Transform socketTransform, Handle handle) { + // DebugLog("MoveHandleToHand"); - Transform handleTransform = handle.GetComponent(); - Rigidbody handleRigidbody = handle.GetComponentInParent(); - if (handleRigidbody != null) - handleTransform = handleRigidbody.transform; + // Transform handleTransform = handle.GetComponent(); + // Rigidbody handleRigidbody = handle.GetComponentInParent(); + // if (handleRigidbody != null) + // handleTransform = handleRigidbody.transform; - handleTransform.rotation = handle.RotationTo(socketTransform.rotation) * handleTransform.rotation; - handleTransform.position += handle.TranslationTo(socketTransform.position); - } + // handleTransform.rotation = handle.RotationTo(socketTransform.rotation) * handleTransform.rotation; + // handleTransform.position += handle.TranslationTo(socketTransform.position); + //} protected override void MoveSocketToHandle(Transform socketTransform, Handle handle) { DebugLog("MoveHandToHandle"); @@ -155,7 +155,7 @@ namespace Passer.Humanoid { DestroyedJoints destroyedJoints = objRigidbody.GetComponent(); // Check if we are grabbing a hand - BasicHandPhysics handPhysics = objRigidbody.GetComponent(); + BasicHandPhysics handPhysics = objRigidbody.GetComponentInParent(); if (handPhysics != null) { // We are grabbing a hand if (thisRigidbody == null) { DebugLog("Cannot attach to hand because this handRigidbody is not present");