Skip to content

Commit

Permalink
The GameObject.willRender method will now factor in the parent `dis…
Browse files Browse the repository at this point in the history
…playList`, if it has one, to the end result. This fixes issues like that where an invisible Layer will still process input events. Fix #5883
  • Loading branch information
photonstorm committed Dec 1, 2021
1 parent 9d9c64d commit 7188040
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gameobjects/GameObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,9 @@ var GameObject = new Class({
*/
willRender: function (camera)
{
return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));
var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;

return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));
},

/**
Expand Down

0 comments on commit 7188040

Please sign in to comment.