Raycaster with InstancedMesh

The new IntancedMesh feature is really cool. I’m still wrapping my head around how it works, and I’m wondering is it possible to use raycasting to intersect an individual instance? Or would I just get the InstancedMesh object as a whole?

1 Like

Is not possible yet!

1 Like

No worries, excited to see what the future holds!

Most likely you’d intersect a single instance of the geometry, somewhere at the origin of the object.

See this article for an approach and a bit of background on instancing.

2 Likes

This is a good read - thanks for all the info!

2 Likes

FYI: Since R111, InstancedMesh supports raycasting:

https://threejs.org/examples/webgl_instancing_raycast

2 Likes