rexrainbow / phaser3-rex-notes

Notes of phaser3 engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rex Dialog cover gets proportionally smaller as camera zoom level is increased.

lagouyn opened this issue · comments

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

When invoking a Rex Dialog for which I have specified that it should use a cover, it works well when the camera zoom is 1.

But when I increased the camera zoom (for example, to 1.5) and then invoked the dialog, cover did not cover the entire game ... instead, it was centered on the game with area around it that was not shaded.

I experimented by changing FullWindowRectangle window to do this...

scale = camera.zoom;

...instead of this...

scale = 1 / camera.zoom;

...and to me it looks like it fixed the issue.

Could you please take a look?

Thank you.
-lagouyn

commented

This demo shows that FullWindowRectangle can resize automatically for camera.zoom between 0.5 to 1.5.
Please provide a simplest runnable test code for your case.

commented

Is this dialog / cover put inot a built-in Container?

commented

I see, the cover / FullWindowRectangle is assigned to 2nd camera, not main camera (1st camera).

Update FullWindowRectangle to get renderable camera on repo. NPM package will upgrade at end of this month.

commented

Yes, they are fixed. But npm package has not upgraded yet.

commented

Here is a demo for showing camera-ignore and cover size.
It uses the latest version minify rexUI plugin, npm package has not upgraded yet.

Edit: Add another method to create dialog by sizer, the cover still can fill with window

commented

The same, provide a simplest runnable test code (on codepen, for example) to demonstrate your case directly, please.

commented

Bug fixed, adding game object did not sync cameraFilter property well.
Please get last minify file of rexui plugin.

commented

Hi and thanks again!I have an unrelated question…Regarding gestures (particulars for mobile device support), I’d like to be able to specify a particular game object to receive certain kinds of gesture events, and to have other game objects ignore those gesture events.For example, in my game I have a map that can have game objects on it. I would like to be able to have gestures work only when they are on my map … I want the other game objects to ignore those gestures (I want these other kinds of game objects to respond to “regular” events, like pointer down/up, drag, etc).So, for example, I’d like to be able to scroll/zoom the camera only when the gesture was directly on the map itself.I’ve read through your docs and tried some of your examples, but I haven’t figured out a way to target specific game objects for certain gesture events.Could you advise?Thank you.-lagouynOn Mar 16, 2024, at 2:36 PM, Allan Young @.> wrote:Your fixe works great. Thank you very much!-lagouynOn Sat, Mar 16, 2024 at 9:39 AM Rex @.> wrote: Bug fixed, adding game object did not sync cameraFilter property well. Please get last minify file of rexui plugin. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Please open another new issue for this unrelated gestures case.