How to recenter HUD to an Actor
I have been implementing a simple HUD where after you select a Building to construct it should follow the building and display a Build and Cancel Button, I have managed to create it partially has I want it to function but need some help with the last part, basically if I move the Building around, the HUD is not always centered to the building and that is causing the problem since I want the buttons to always be in the same place centered to the Building, here are some Images to demonstrate what I mean.
In this image you can see that the building and button are correctly placed:
But if I move the building a little bit, the buttons get offset to the wrong position:
Here is the Blueprint Function I'm using to re-position the HUD:
and here is the code in C++ that calls the function and passes the parameters to it:
Any help with this would be great, thank you.
asked Sep 11 '16 at 07:41 AM in Blueprint Scripting
Sorry for confusing you - I mean't that if you went into the Widget Component and then went down to User Interface and selected 'Screen' instead of 'World' it should fix the issue for you. I should have been more descriptive.
answered Sep 30 '16 at 03:11 PM
Thanks for providing additional information. Code and UMG aren't typically what I work with, so I'm unfamiliar with some aspects of the engine. While it's possible that you're entering the wrong code, I would suggest taking that question to the forums for additional review.
What I would suggest you do is if you feel there is a bug you've found with the widget not being painted when you change anything manually in the Engine, you should write up a bug report.
Please make sure that if you choose to go this route, you provide detailed information, including repro. steps.
answered Oct 17 '16 at 08:13 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here