onClick with overlapping meshes

event.stopPropagation is most likely what you’re looking for:

<Card
  onClick={(event) => {
    event.stopPropagation(); // NOTE Stop the event from going any further than this handler
    event.preventDefault(); // NOTE Optional, in case there's some default behaviour assigned to the element that you'd like to not happen

    // NOTE Rest of your code
  }}
/>
1 Like