Having trouble with Raycasting in Three.js and WhitestormJS. Perhaps I haven't grasped the concept properly.
The goal is to align the raycaster's direction with the camera, so that when it intersects an element, that element is added to the intersect array.
The issue is that my "intersect" array remains empty even when I move the camera towards an element.
Check out the codepen link for reference: https://codepen.io/paulbonneau/pen/zdVeJx?editors=1111
Here's my code:
const app = new WHS.App([
new WHS.ElementModule({
container: document.getElementById('app')
}),
new WHS.SceneModule(),
// more modules...
]);
// Additional code for raycasting and camera manipulation
// ...
// Starting the app
app.start();