TomorrowTodayLabs / NewtonVR

A virtual reality interaction system for unity based on physics.
MIT License
788 stars 196 forks source link

UnityEvents #163

Open khalv opened 6 years ago

khalv commented 6 years ago

NVRInteractable has BeginInteraction and EndInteraction methods, but despite this, OnInteractionStart and OnInteractionEnd only exist in the NVRInteractableItem class.... so you can't have a common behavior for an NVRInteractableRotator and an NVRInteractableItem without re-implementing the events in the rotator class. Also, NVRInteractableItem has an OnHovering event (called every frame) but not an OnBeginHover/OnEndHover event. What if you want to trigger a visual outline to an object when hovering over it? It's a mess. Also, it would be nice if the interaction events were of type UnityEvent\<NVRHand>, passing a reference of the interacting hand. Would make it easier to trigger haptic pulses (if they would work).