November 2017
Beginner
294 pages
6h 55m
English
A raycaster shoots a ray out into the world and calculates what it touches. You usually see these as glowing lines from VR controllers. Without a controller, the raycaster will cast a ray from the center of the screen; this is exactly what we need to implement our Gaze button.
In this case, as we did with the button, there is already a simple-raycaster out there. If you haven't yet, you need to install it from npm via the following command:
npm install --save simple-raycaster
Implementation of the simple-raycaster is pretty easy. In client.js, below the existing import ...
Read now
Unlock full access