I am looking into how to implement a world map widget for a tab in my pause menu. I have tried the 2 scroll boxes method but that just feels horrible. First you cannot pan diagonally, second whenever you pan with the right click and let go the map keeps scrolling in that direction briefly, which I don’t want at all. This is what my menu tab looks like right now:
As you can see, my map widget doesn’t cover the entire screen nor should it. It should be confined in a space and then the player should be able to pan around it and zoom in/out. Another thing I don’t really know how to avoid is because I already have an input mapped to the middle mouse button and another on the middle mouse axis, can I somehow make the same inputs for the map?
Hey there @MorningstarMagic! Maps are always a fun one. I’ve got two resources for you that might help out! They are primarily mini-maps but carry most of the functionality you want. If you go with anything involving a material you can just shift the UVs of the map based on where you click dragged with some material parameters.
Depending on how your inputs are implemented, you can have the map accept only the UI inputs only and whenever the player pauses it swaps over to the UI input set. Including one tutorial on the basics of input control, and then one on the entire common UI (which I’m sure you’ve already seen but it’s always good to put it out there).
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Maps:
UI input only:
Massive introduction to common UI (Bonus):
1 Like
The solution is here: How to scale/zoom a widget with blueprints? - #21 by TheArchitect
Just check out the entire post and you will see how it is done. There is also a project link there so you can download it and check that out if you’d like. I’ve tested a bit and this works perfectly even if the image does not take up the entire screen.