Jump to content

Collision between priorityID and pixelPerfectClick


Skell
 Share

Recommended Posts

1. Create gui, but there was a problem, when set pixelPerfectClick = true - disable priorityID...

 

In the example below, when crossing the  sprites manga and card - always active to drag only card (manga have a higher priority than card).

 

if card.input.pixelPerfectClick = false, that  priority works well (active to drag manga).

    var manga = new Phaser.Sprite(game, 100, 100, 'manga');    manga.inputEnabled = true;    manga.input.enableDrag();    manga.input.priorityID = 3; // !    game.world.addChild(manga);    var card = new Phaser.Sprite(game, 300, 300, 'card');    card.inputEnabled = true;    card.input.pixelPerfectClick = true;// disable priorityID ?    card.input.pixelPerfectAlpha = 1;    card.input.enableDrag();    card.input.priorityID = 0; // !    game.world.addChild(card);

How to enable priorityID,  if pixelPerfectClick = true?

 

2.  If the objects are in different groups, how it affects the priority of events?

 

Apparently, objects are in the various groups, prioritid behaves as if the objects are in the same group.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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