How to get object in WebGL 3d space from a mouse click coordinate

You’re looking for an unproject function, which converts screen coordinates into a ray cast from the camera position into the 3D world. You must then perform ray/triangle intersection tests to find the closest triangle to the camera which also intersects the ray. I have an example of unprojecting available at jax/camera.js#L568 — but you’ll still … Read more