Open paulhayes opened 7 years ago
I like this idea and am in full support of adding it to the project. It's definitely needed if we want to have proper support for non UI elements.
Okay, I've added this into my fork, and I've issues a pull request. Hope you like it.
I've also been thinking of adding a parabola raycaster, for teleport systems. Whatcha think?
I've been experimenting with a flexible simple to understand system for both interactive elements in a scene, and scripts attached to the controllers themselves, getting notification of pointer events.
By having a LaserPointerEventData which inherits from PointerEventData, but adds the current object, we can execute the event on both the controller and the raycast target hit. Here's a UML sequence diagram, the change is in red.
https://docs.google.com/drawings/d/1PJHluA771l2r_YbolvIAVGECPJEEyEGNa29X97QOlWg/edit?usp=sharing