Closed
Description
Version
- Phaser Version: 3.52 only
Description
interactive object that are invisible and has a interactive object behind it, do not receive input events even if it has "input.alwaysEnabled = true"
Example Test Code
var config = {
type: Phaser.WEBGL,
parent: 'phaser-example',
width: 800,
height: 600,
scene: {
create: create
}
};
var game = new Phaser.Game(config);
function create()
{
var invisibleRect = this.add.rectangle(400, 300, 256, 256, 0x00ff00);
var rect = this.add.rectangle(400, 300, 256, 256, 0x0000ff).setDepth(-1);
var text = this.add.text(128, 128, "0").setFontSize(28);
var count = 0;
invisibleRect.setInteractive();
invisibleRect.input.alwaysEnabled = true;
invisibleRect.on('pointerdown', function () {
count++;
text.text = count.toString();
});
rect.setInteractive();
invisibleRect.alpha = 0;
}
Additional Information
Did some testing a i begin to get the bug after the commit "616566c - Renamed sortGameObjects
to sortDropZones
and then repurposed the old method for the new render list sorting technique."