-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Description
A. 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?
At the forum there is a similar topic (not solved):
http://www.html5gamedevs.com/topic/4680-input-priorityid-problem/?hl=pixelperfectclick
B. If the objects are in different groups, how it affects the priority of events?
Apparently, objects are in the various groups, priorityID behaves as if the objects are in the same group.
Metadata
Metadata
Assignees
Labels
No labels