protected void UpdateHandRetracting(DHUI_HoverEventArgs _hoverEventArgs) { if (handRetracting) { float dist = StaticContactPlane.GetDistance(_hoverEventArgs.InteractorPhysicalPosition); if (internal_touchableState != TouchableInternalStates.Touch && ((Time.time >= lastTouchedUp + _maxRetractionTime) || dist >= _retargetingActivationDistance)) { handRetracting = false; OnRetractionEnd?.Invoke(_hoverEventArgs); } } }
protected virtual void UpdateTouchableStates(DHUI_HoverEventArgs _hoverEvent) { float dist = StaticContactPlane.GetDistance(_hoverEvent.InteractorVirtualPosition); if (dist <= _touchThreshold) { TouchableInternalState = TouchableInternalStates.Touch; } else if (dist <= _nearTouchThreshold) { TouchableInternalState = TouchableInternalStates.NearTouch; } else { TouchableInternalState = TouchableInternalStates.Hover; } }