So I am working on a top-down game where the camera is static and the player can move around. I also have a simple widget blueprint with a canvas panel and an image of a heart icon.
Now in certain gameplay events, I want to move the heart icon to the location of the player.
To do so I’ve used the node “Project World Location to Widget Position”, which worked great but broke once I had changed the anchor of my image from the default “Top Left” to “Bottom Left”. I’ve tried many things but none work.
Ultimately I would love it to work with any anchor but especially with “Bottom Left” and “Bottom Center”.
Hope the drawing helps get the idea
Hey @Sntfon100
so as an example:
- The moving widget
- The function setting the position:
- You can select the desired corner to add a delta value to the position and you get a smaller image depending on the distance of the character from the camera
UE427_MovingHeart.zip (1.3 MB)
1 Like
Wow thanks alot for providing an example and even a project!
This works nicely but in my case I have a “main” widget with a canvas panel and the heart widget is inside of it, and in that case it stops working.
Do you any lead on how to fix this? I think a simple solution would be to not put it in the “main” widget but then I’m not sure how I can change its location from top-left.
1 Like
YES! Thank you so much this works perfectly, I gotta go study this now!
This is indeed game of the year
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.