O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Processing hits

Processing a hit is a very wide concept. It basically depends on the type of application that you are building. For instance if your application is a CAD system, you might want to retrieve on screen the properties of the object that you picked to edit them. You might also want to move the object or change its dimensions. In contrast, if you are developing a game, you could have selected the next target that your main character has to fight. We will leave this part of the code for you to decide. Nevertheless, we have included a simple example in the next Time for action section where you can drag-and-drop objects, which is one of the most common interactions you could have with your scene.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required