InstancedMesh onClick return all object in the path in recents versions #2103
-
Hi I found strange behavior for InstancedMesh onClick callback. A simple console log has return all instance in the Line of Sight path if we click nearest object to camera.
in the version 7.0.7 until the latest 7.0.26 a click in the front cube will return all instanceId behind it (relative to the camera) while in the version 7.0.6 a click in the front cube, correctly return only instanceId of the cube a fork of react fiber demo where we can see the behavior of recent version is here
Is the recent behavior is expected, if yes can we get the actual cube instanceId that is clicked only using recent version? Many thanks AB |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe this change was intentional to streamline instanced meshes; this behavior is consistent with the DOM and all scene objects. You can recreate the previous behavior by calling |
Beta Was this translation helpful? Give feedback.
I believe this change was intentional to streamline instanced meshes; this behavior is consistent with the DOM and all scene objects.
You can recreate the previous behavior by calling
event.stopPropagation()
in your event handlers.