Babsobar Posted November 21, 2018 Share Posted November 21, 2018 Hello everyone, I've got a container that has some buttons inside of it, it's a GUI so I have it fixed to the camera with .setScrollFactor(0). My camera can zoom in and out of the tilemap, and when it does, the GUI scales with it, which is the unwanted behavior. I've looked in the documentation and have been trying to find something like .setZoomFactor(0) but unfortunately I could not find anything like it. I then looked inside the examples and in cameras found the ignore container example, which is somewhat similar to what i want. So I created a camera just for displaying the GUI and set its bounds to the editorGUI container all the while ignoring my editorGUI container in my main camera. Now the buttons inside the container aren't scaling when zooming the map, which is the wanted behavior, but they become unresponsive to input. You can find the code on this github concerned files are editor.js and createButtons.js inside /js directory. Any help is greatly appreciated! Thanks, Bab Link to comment Share on other sites More sharing options...
Babsobar Posted December 4, 2018 Author Share Posted December 4, 2018 Just wanted to update on this in case someone is ever searching for a similar problem. I solved my issue by creating another scene and launching that scene within my editor scene. It's actually much easier, and you retain all the goodness of containers whilst still being able to pass information between those two. So yeah, scenes, scenes all the way. Link to comment Share on other sites More sharing options...
Recommended Posts