I would like an object and a bitmap text to always be on the top left corner of the screen, but sometimes in my game the camera will rotate and the object and bitmap text will not rotate, so the bitmap text and object are not on the top left corner of the screen. How do I make it so that the object and the text rotate with the camera?
I am currently using setScrollFactor(0)
For the elements that you do not want to move when the camera moves, by chance are these UI elements (like minimap, health bar, etc)?
For objects that you don’t want to move, one idea is that you could put these in another Phaser Scene, and have that Scene running at that same time as your other Scene. This would allow you to have your camera move in your current scene and it would not affect the UI scene.
yes, the object that I do not want to move is in fact a health bar. I will try this and get back to you if it works, thanks
Great! It works! But i had to use scene.launch
instead of scene.start
because if I used scene.start
for some reason it would start the new scene for ui and stop the scene for the whole game.