Updating 2D image of dice result in realtime - Paper 2D, UMG or HUD?
Hey all, I'm in the process of creating a dice based game and want to go from displaying the dice results as an integer on screen to a 2D image of the dice. I've tried normal HUD and UMG so far, in UMG I'm not sure how to swap the displayed image in real-time and for each instance of dice. I've tried laying multiple UMG images on top of each other and using ZOrder to choose which is on top, this hasn't worked though.
As for 'traditional' HUD I have a working implementation but only for a single die, I can't get multiple instances of the resulting image to display. I've tried using a loop to call the function in which the image is drawn but that just updates the original instance.
It's just come across my mind that maybe I should be using Paper 2D for this sort of HUD element, but I though I'd ask here first before I spend the time implementing it.
I would recommend using the UMG, HUD is outdated and Paper2D is a plugin that you probably don't need in the project.
Changing active texture is actually quite simple: add Image to you UMG widget, and expose it (add name and click the box). Then, inside graph editor, get reference to that UMG element and SetBrushFromTexture to swap the textures (I am talking from memory, names could be a bit different).
I hope this helps
answered Apr 11 '16 at 11:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here