rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.18k stars 259 forks source link

Rex Dialog cannot be set to be ignored by a camera #414

Closed lagouyn closed 2 months ago

lagouyn commented 4 months ago

I'm using: phaser3-rex-plugins -- 1.80.1 phaser 3 -- 3.80.1

Using Phaser 3 camera' ignore() function, if I specify a Rex Dialog as the thing to be ignored, I found that the dialog was NOT ignored by camera.

I noticed this because in my game, I'm using two cameras ... one is for objects that should move or be zoomed ... the other is for objects that should.

When I invoked the Rex dialog, both cameras were showing the Dialog. So, i tried having one of the cameras ignore the Dialog, but that had no effect.

(As a workaround, I wrote a function to recursively walk the Dialog and all of its children, etc, calling the camera's ignore function on each ... after calling that, the camera did not show the Dialog.)

It would be great if all you had to do was call camera.ignore(dialog).

Could you please take a look?

Thank you. -lagouyn

rexrainbow commented 3 months ago

Plugin updated, now containerLite/sizers can sync cameraFilterproperty. (Demo). NPM package will be upgraded at end of this month.