Fix element at zoom on Phaser3

核能气质少年 提交于 2020-03-03 06:42:10

问题


How to fix an element at one point, despite the zoom? setScrollFactor(x [, y]) doesn't hepl me. I have a moving element behind which the camera is moving. But I need to keep the button always in the right corner

Thanks for the fast reply)


回答1:


create a separate scene specifically for the element that you want to remain static

in Phaser 3 multiple scenes can exist at the same time, and they have their own cameras (at least one main camera per scene), which allows you to have scene A with a moving camera rendering the game world, and scene B with a static camera rendering the UI



来源:https://stackoverflow.com/questions/58186475/fix-element-at-zoom-on-phaser3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!