void OnGripPressed() { Debug.Log("Grip pressed"); if (grabbedObject != null) { localPlayer.CmdDrop(grabbedObject.netId, currentVelocity); grabbedObject = null; } else if (touchedObject != null) // we have nothing grabbed but something is colliding with our hands { Debug.Log("While touching: " + touchedObject.name); if (touchedObject.isGrabbable) { localPlayer.CmdGrab(touchedObject.netId, netId); // connectionToClient is only non-null on the player object // gets attached to controller in OnStartAuthority of InteractableObject grabbedObject = touchedObject; } } }