The InputPlugin.sortGameObjects method was using the Camera Render List to determine the Game Object display list. This would exclude non-rendering objects, such as Game Objects with alpha set to zero, even if their Input alwaysEnable flag was set. This method now uses the Display List instead, which gives correct results for invisible 'always enabled' objects. Fix #5507

This commit is contained in:
Richard Davey 2022-11-21 23:26:44 +00:00
parent 154e262ae8
commit 436a42cfb4
2 changed files with 6 additions and 1 deletions

View file

@ -848,6 +848,11 @@ var InputManager = new Class({
return false;
}
if (input.alwaysEnabled)
{
return true;
}
var visible = true;
var parent = gameObject.parentContainer;

View file

@ -2670,7 +2670,7 @@ var InputPlugin = new Class({
return gameObjects;
}
var list = pointer.camera.renderList;
var list = this.displayList.list;
return gameObjects.sort(function (childA, childB)
{