Thanks you very much Stuckbug , This was my issue with the offset.
Ok so for people like me who want to know how to do this in version 4.7:
Be sure check on Engine Scalability Settings and set you “resolution Scale” to 100%
1 - Create a widget (In my case is called “PickupText”) with a text box and on the graph just add a text variable and bind the content of the text box to that variable. I create the text box centered like you can see on the image.
&stc=1On the next image you can see why the text is centered. On The Image the new Widget component for the blueprints:
&stc=12 - On you pickup/object/blueprint etc…:
- Add a widget component and set “widget class” to you widget (In my case is called “PickupText”)
- Set the UI Space to “Screen”
- uncheck Visible if you don’t want the widget visible all the time.
On Event Graph:
Event Begin play → Get User Widget Object → Cast to you widget (for get the variables on the widget and add/get/change parameters)
&stc=1In my case my text widget have 2 variables “PickupText” and “PickUpActor” and I grab the values from my struc “iteminfo”
3- In case you only want to display the widget when you enter a trigger volume, you can use “set visibility” for the widget component:
(in my case I first cast to my character for be sure the trigger collide with my character before display the text)
&stc=1That’s all, I hope this can help to someone like me
Greetings!
Ok so I continue playing with this and I found something weird, no idea if is a bug or I do something wrong… the case is , The set up I post before for trigger the widget with a collision work but only for visibility On. When I set the visivility Off I have something strange… if I exit the trigger and the widget is not on the screen , it turn off , if the widget is on the screen (like Walking backwards) I can’t turn off the visibility and seems the widget is attached to the camera or something…
So To fix that I set the visibility on the widget itself (on the text box).
First (if you want to do the same) you must change some parameters on you widget for the text. You Must expose the text box component of the widget to a variable and set the “behaviour” → “visibility” to “Hiden”:
&stc=1Second on you pickUp/blueprint etc…you must change some settings. The widget component must have Rendering → Visibility check and the node network for the triggers is as follow:
&stc=1I hope that can help
BTW: No idea how post the images as a thumbnail sorry
How can i setup the [Break InventoryStruc] on Lui’s method?
If you have a Get node out for your Struct when you drag off it and type in Break one of the results should be Break structname.
Thank you for the answer MW, i am still learning UE, so didn’t get the part (Get node out for your struct). I don’t know how to create this ‘‘think’’ to break. Can please give me more detailed information?
Thanks.
Take a look at this series of videos (is for the old way but have a part about the struct (structures):
You can download the project files, just open the launcher and download form the learn tab.
Greetings!
Lui thanks for your explanation on fixing the problem with the widget staying on screen, I’ve been trying to fix that in my project all night!
Any idea yet whether this is a bug with the screen-space setting or not? When the widget is set to ‘world’ it doesn’t seem to have this problem (i can toggle the widget visibility on and off no problems in that case).
Thank you very much Lui, much appreciate you help!
, I was curious if we could get the github commmit references for the 4.8 changes you were referring to above for the quality issue, and extended the control for ZOrder.
Thanks! (Sorry for the necromancy)
Fantastic infomation here, sorry to necro this but i had a kind of strange use case that i would love some advice on related to this.
Im thinking about a implementation where the screen space widgets would not be able to collide over each other (think big loot drops in path of exile or diablo when you hold ALT). From what i understand this method would not be best as i would not be able to get that kind of control. Would i be best writing something within a AHUD and avoid UMG to get that kind of control? at the moment seems like the best idea but would be open to other implementation hints (i may be missing something with all these new features).
I’d make a special panel, just like there’s the Horizontal Box, and a Grid Panel. I would recommend you make a new Slate panel that does clustering and non-overlapping efficiently. Then just wrap it with a UWidget and add loot to it as it appears and let it manage the overlapping.
Sorry to necro this thread but I spent my day trying to get a solution and I’m totally lost.
1 - I’m using ProjectWorldToScreen to get the screenposition (it’s equivalent to BP function ConvertWorldLocationtoScreenLocation). From what I understood, it will give me the world position in the screen position taking into account the current resolution.
2 - Next I set this value in the widget set position with RemoveDpiScale = false. in order to get it exactly where I want it in the current resolution.
Sadly, it doesnt work. I can get to have my Text over the full screen. I limited in an area that seems to be the “Current Resolution area” compared to a 1080p resolution.
Can anyone help me to get this sort out?
Thanks,
In fact, I just had to check the RemoveDpiScale to get this sort out.
My intial issue was in the Clamping of my position where I used DesiredSize but I had to scale it to the current resolution as the desiredsize is in 1080p.
Thanks,
Well this thread maybe 2 years old but it’s just helped me get a cursor working in UMG.
Genius nice one
In case somebody comes here and discover that you lose the widget after turning around, i found this other solution that reposition the widget using the anchors…works awesome
https://answers.unrealengine.com/questions/119848/how-would-i-go-about-making-a-movable-window.html
Ok, this is absolutely doing my head in now. I’ve been at this for hours and just can’t get it to work. I’m hoping I’m missing something really simple and stupidly obvious…
Firstly, I can’t get a couple of things to line-up with what you’ve shown. For example:
When I try and bind the content field, all I get is a function with a return node that I cannot rename (no matter what):
I’ve tried not making the text box variable, not renaming it… I’ve looked everywhere in the widget to be able to create a named variable… no dice. I suspect this may be at the heart of the next problem too…
In your BP you have a SET node that I just can’t get to show:
The only SET node that I can access that looks like it comes close to what I would need is:
But it’s looking for a text reference class and I can’t find any way of plugging a string or text into it.
What exactly am I doing wrong?
Ok, I figured this out. Created a variable in the widget construction script and it all came together from there…
Ok one thing is very strange in the first example…
How you can get an “actor” location from a Widget Child? ???