Jump to content

Change hitbox of Pointer


Criparra
 Share

Recommended Posts

Hello! 

I have a problem, to which I have looked for a solution, but I have not found anything. 

I have many polygons drawn on a canvas, using Pixi.graphics. 
Each of these polygons make up a mesh (between two polygons they share only one segment, there is no more overlapping).
Each polygon has a pointer over and pointer out event. 

My question is: How can I make that when passing over the pointer, more than one polygon is called with the pointer over event?

My solution was to try to change the size of the pointer hitbox, but I haven't accomplished anything.

Thanks in advance!

Link to comment
Share on other sites

Only with manual hitTest called in interactionManager: renderer.plugins.interaction.hitTest(...)

https://github.com/pixijs/pixi.js/blob/a967f4843e0c8dbd172c11e09a8253519de75fc6/packages/interaction/src/InteractionManager.js#L705

You can also override several methods to allow multiple objects selected, but i think that'll be more difficult.

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...