private void Update() { PhysicsTracker.Update(transform.position, transform.rotation, Time.smoothDeltaTime); //If hand is blocked cannot do anything if (Blocked) { //Debug.Log("blocked"); HoveredInteractable = null; return; } //Interactions with attached grabbable objects, it blocks hover interactions if (AttachedGrabbable) { //Debug.Log("AttachedGrabbable: " + AttachedGrabbable); AttachedGrabbable.Interact(this); } //IMPORTANT can't be else if because need to hover Slots to be able to let Grabbables on Slots /*else*/ if (HoveredInteractable = HoverInteractableDetection()) { //Debug.Log("HoveredInteractable: " + HoveredInteractable); HoveredInteractable.Interact(this); } }
protected virtual void LateUpdate() { blocked = null; if (AttachedGrabbable) { AttachedGrabbable.NullOverlapping(); } }