Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive elements reporting intersections outside of children #258

Open
richardanaya opened this issue Mar 11, 2023 · 3 comments
Open
Labels
bug Something isn't working

Comments

@richardanaya
Copy link
Contributor

richardanaya commented Mar 11, 2023

I have a scene with multiple Interactive tags, and they seem to be reporting intersections for elements outside of children of the individual tag. This makes it pretty difficult for me to to interactions with objects that aren't necessarily in the foreground of my scene.

@richardanaya richardanaya changed the title I'm having trouble with Interactive elements Interactive elements reporting interactions outside of children Mar 11, 2023
@richardanaya richardanaya changed the title Interactive elements reporting interactions outside of children Interactive elements reporting intersections outside of children Mar 11, 2023
@richardanaya
Copy link
Contributor Author

What I do as a work around right now is create a component called

function SemiInteractive(props: { interactable: boolean } & InteractiveProps) {
  if (props.interactable) {
    return <Interactive {...props}>{props.children}</Interactive>;
  }
  return <>{props.children}</>;
}

That turns on and off interactive component to prevent it from stealing access.

@CodyJasonBennett CodyJasonBennett added the bug Something isn't working label Mar 12, 2023
@saitonakamura
Copy link
Sponsor Collaborator

@richardanaya could you provide a small repro of illustrating this behaviour? I'm struggling to wrap my head around it and events code is pretty tricky to get right

@richardanaya
Copy link
Contributor Author

Sure thing, let me think about this a bit more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants