Jump to content

Multiple Hit Targets?


jodo
 Share

Recommended Posts

I want the User to be able to connect two Objects with a Line. Therefore I need the hit target on pointerup. I display the virtual line which changes position with moving the cursor (the end of the line is always below the cursor). Thus when the user clicks the hit target is always the virtual line object. 

Is it possible to get all hit targets (also the ones below) and not just the first one? Or something like a blacklist/whitelist to ignore some interactive elements on the hit test or only test specific objects?

Link to comment
Share on other sites

There's interactiveChildren. That kind of problems are solved through reading this method: https://github.com/pixijs/pixi.js/blob/dev/src/interaction/InteractionManager.js#L991 . If you dont fint the way with vanilla, you can patch it like that:

 

PIXI.InteractionManager.processInteractive = function(...) { ... }

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...