bryik/aframe-controller-cursor-component

expose intersection object as readable property

nylki opened this issue · 3 comments

nylki commented

It is very useful to have access to the intersection object in the specified events (mouseenter etc). However I'd like to be able to get the intersection position while hovering, so I can draw a 3d-cursor at the exact intersection position.

I therefore propose exposing the intersection object to make it easier accessible from the outside.

Alternatively: it would be useful to tell controller-cursor the id of acursor element (eg. a <a-sphere>), which would get its position and rotation updated according to the intersection.

bryik commented

Considering laser controls are now integrated into A-Frame core, you may want to file a feature request there.

TBH I am not planning to put much work into this component now that an official solution is available.

Yeah, the laser controls should provide the intersection data.

nylki commented

Gotcha! Nice to see the laser-component being a core component.
@ngokevin Just to make sure I got you right, do you mean that the laser controls are already exposing the intersection object outside of events; or that I could file an issue / make a PR?

EDIT: Using the raycaster intersection events works too, using it at the moment for my current project. But adds a slight overhead to listen for the event etc.