If you read my last article you know that I managed to build a winter scene, add png based characters, add hands and grabbing capability and teleportation. If you don't launch into VR you can use the WASD keys to move around.
I was excited to be able to add teleport. Tuesday night I gave a talk at the Denver VR Meetup about A-Frame and why I believe the Web will eat gaming in VR in 2018.
Once I showed teleport to the group in VR inside of a web page I could see that the group was interested. Before the demo people seemed to ignore me when I would bring this up.
So, I thought hands were great but I wanted my controllers and not cartoon hands. I went back and studied the examples on A-Frame and found A-Painter. In A-Painter I saw that the program recognized my controller and added controls almost identical to TiltBrush. When I saw the tooltips explaining the controller functions I was amazed. So, not only could I teleport but I could create a modified menu based on the controller. I downloaded the Github version and tested it on my desktop. It worked like a charm.
I tore the code apart and found in the build.js file code that checked controller type and saw that it was setup for Vive as well. I found the all of the tooltip and teleport components in the vendor folder.
On A-Frame's Slack channel I found code that acts as a point and click interface. This code also checks controller type. I plan on doing an extensive explanation of how the code works to identify controller type as well as how to add a function to each controller button and trigger.
Here's a link to code on CodePen: https://codepen.io/luiting57/pen/dWLVwr
Rumour has it that all of the controller and teleport functionality will be included in the core when version 6.0 comes out.
But, the open web has a much greater number of people. And this can be viewed in 2D as well.