InstancedMesh- raycast each instance separately

Is it possible to get each instance of instancedMesh using raycaster?

The following example should demonstrate what you are looking for:

https://threejs.org/examples/webgl_instancing_raycast

1 Like

Yes I came accross this. Thank you;) Actually i am trying to do it with react-three-fiber, i have instanced mesh and lots of instances but it continously refers to the last object;/

Do mind demonstrating this issue with a live example?

Ok i will prepare a fiddle showing usecase

Here is an example on sandbox: https://codesandbox.io/s/immutable-shadow-17glj

Sorry, but that looks like a react-three-fiber issue. Probably better to file an issue at the respective repository:

Ok thanks anyway for trying to help;)