Controller with laser pointer


#1

I saw a bunch of you using a pointer on your controller in the zapbox hackathon. I was thinking of using one as well and wanted to ask.

What did you find that worked the best?
Was it a 3d model and if so what was it?
What did you find to be the best length of the pointer to use?

Thanks,
Steve

Ps. Can’t wait to get the button code! I was looking to see if I could see the code from the video. :smile:


#2

Hi again Steve,

Tom’s been kind enough to offer the following explanation for his laser pointer implementation:

" You can create the pointer effect with two long, narrow planes intersecting across each other at a 90 degree angle.

Put these into a group, colour it a bright colour like red or pink - this creates the “laser” effect, so the user can see where they’re pointing to.

Next, add a Raycaster to the group pointing in the same direction, and set the group at the tip of the Controller 3D model.

Finally, listen for events wherein the Raycaster on the controller intersects the planes you want to use as buttons or tiles, and then highlight them.

On the hackathon, we used the controller “slider” functionality to then “activate” these buttons/tiles, but you can also do a similar thing with a timed activation (highlight the button/tile for a short time interval to activate it). Pointer lengths don’t matter, since a Raycaster will point in a direction until it hits something. "

Hope this helps.

Thanks,
Seb


#3

Thank you!!
Can’t wait to play with it!

Steve