Skip to content

ignore PointerEvents on hidden (visible={false}) meshes #2417

Answered by drcmda
TimKraemer asked this question in Q&A
Discussion options

You must be logged in to vote

It’s weird but that’s generally how three works. THREE.RayCaster is at fault here. In fiber it's an easy fix because you can change the the event filter.

<Canvas onCreated={(state) => {
  state.setEvents({ filter: (intersections) => intersections.filter(i => i.object.visible) })

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@TimKraemer
Comment options

@drcmda
Comment options

@TimKraemer
Comment options

Answer selected by TimKraemer
Comment options

You must be logged in to vote
2 replies
@TimKraemer
Comment options

@mustafalazzawe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants