diff --git a/Editor/Tools/Socket_Editor.cs b/Editor/Tools/Socket_Editor.cs index c9c7164..b1a5a2e 100644 --- a/Editor/Tools/Socket_Editor.cs +++ b/Editor/Tools/Socket_Editor.cs @@ -76,6 +76,8 @@ namespace Passer.Humanoid { } protected virtual void AttachPrefab(Socket socket, SerializedProperty attachedTransformProp, GameObject prefab) { + SerializedProperty attachedHandleProp = serializedObject.FindProperty("attachedHandle"); + if (attachedTransformProp.objectReferenceValue != null) ReleaseObject(socket, attachedTransformProp); @@ -87,6 +89,7 @@ namespace Passer.Humanoid { Debug.LogWarning("Could not attach transform"); else { attachedTransformProp.objectReferenceValue = obj; + attachedHandleProp.objectReferenceValue = socket.attachedHandle; //Handle handle = socket.attachedHandle; //if (handle == null) // Handle.Create(obj, socket); diff --git a/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs b/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs index 09b8bfa..a656542 100644 --- a/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs +++ b/Runtime/HumanoidControl/Scripts/Interaction/HandInteraction.cs @@ -580,10 +580,10 @@ namespace Passer.Humanoid { AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders); } - //if (handle.socket != null) { - // Debug.Log("Grab from socket"); - // handle.socket.Release(); - //} + if (handle.socket != null) { + Debug.Log("Grab from socket"); + handle.socket.Release(); + } targetToHandle = hand.target.transform.InverseTransformPoint(grabSocket.transform.position);