Select object on click

I understand that there have been several questions on this subject, but I have found the answers confusing and would like some further verification.

How do I select an object by clicking? I intend to use this for a 3D game level editor and precision is of more importance to me than performance.

1 Like

The usual way of doing this is by using THREE.Raycaster. A typical example for raycasting can be found here: three.js webgl - interactive cubes

Instead of triggering raycasting in a mousemove event listener, you just do this within a click or pointerdown event listener.

4 Likes