private void SetVelocity() { if (Connector as HandConnector is var handConnector && handConnector != null) { rb.velocity = VRInput.Skeleton(handConnector.Hand.HandType).velocity; rb.angularVelocity = VRInput.Skeleton(handConnector.Hand.HandType).angularVelocity; } }
protected override void OnRemoveConnection() { Logger.Print("Throwing LuerlockItemConnection, interactable: " + interactable); if (interactable != null && interactable.State == InteractState.Grabbed) { Logger.Print("Throwing luerlock"); var handType = Hand.GrabbingHand(interactable).HandType; connectedRB.velocity = VRInput.Skeleton(handType).velocity; connectedRB.angularVelocity = VRInput.Skeleton(handType).angularVelocity; } Destroy(joint); }