User Widget Component Movement

Hello! Has anyone had the problem where a widget component, attached to a character, moves around as the character moves? I included some examples below. I have added healthbar, names, and a little resistances tile to each enemy (though not all enemies have resistances) as widget componenets in their BPs. Then just attached a created widget to that component. Nothing special. I’ve noticed that the farther an enemy is away from me, the more skewed in that particular direction the Widget components are. I’ve messed around with positioning and settings in the component/widget, but to no avail. don’t see anything pertinent on google as this is for top-down and not much applies. Any help is appreciated!

In this image you can see the resistance widget just slightly to the left.
image

When i move away from them, it moves farther left (hope this makes sense). It does the same when i am to the right of them. It is only centered when they are right above or below me.
image

It is hard to catch a screenshot with them farther away, but when they are a distance from the character, the widgets are very skewed! Any help appreciated!

image

Looks dodgy AF. Could you tell more about the widget?

  • a single widget component in Screen Space mode attached to which actor component? Could we see the details?
  • what’s the widget hierarchy like?

Oh yes its dodgy :rofl: Im not trying to make it really magical here, just get something to indicate enemy resistances.

There are 4 resistances: Lightning, Fire, Frost, and Poison. Each of them are a single widget, loaded in by bool vars in the parent enemy BP:

Its literally just a widet component added with these specs:

The first BP indicates which resistance widget to add to the enemy. here is an example widget:

There is absolutely nothing in the widget graph.

Is there anything else i could show?

Also, not sure if it needs to be shown, but here is the widget component in hierarchy of the parent enemy:

Are you doing this to ensure the component shows stuff in the centre?

Also, i should note that the health bars and enemy names (pictured in the original images) also move around like this. I’d like them to be just static above the enemy. I have already tried adding the component to different places in the component hierarchy with no luck.

Yes, i have also moved this around a lot too just to experiment and hopefully find a solution. it is at -15 simply because its the last place i put it and honestly the best spot so far. It still moves around tho. I was hoping just having it dead center would make it stick but it is unfortunately not the case.

I think it’s this canvas offset, actually.

  • remove the canvas panel completely; you do not need it here (great performance boost by the way!); not sure if relevant but you probably do not need 500x500 px image for this.
  • the widget screen size will be dictated by the components Draw Size, punch in manually 30,30 (ideally do 32,32 if feasible)

How does it look?


The widget is placed at the tip of the arrow.

Same problem. Remove canvas panels (good to know i dont need these thank you!), set to 32,32. here is the output:

I should also note that these widgets are dead center on X and Y. they are only adjusted on z for appropriate placement

these widgets are dead center on X and Y. they are only adjusted on z for appropriate placement

Same as in my example, I believe. The vid does not load for me, sadly. Can’t reproduce it on my end.

Okay im going to try and reproduce it in a blank project for my own sanity in the morning and then send it over to you. I am certain that this has to do with the top down camera. Looking at some third person projects, the Z axis does not seem to change significantly with respect to the third person camera (Z always points up). So in top down camera perspective, the farther a player is away from something, it seems like its Z is pointing slightly in another direction with respect to the top down camera. Its almost like the camera is fish-eyed or something. :man_shrugging: i hope that makes sense. I know it shouldnt behave that way but it seems to be what im seeing.

Attaching reproduced issue in blank project here
WidgetTest.zip (4.8 MB)

1 Like

Very good job at getting the project size down. This Android dev is paying off :smiley:

Interesting, I just tried this, and the widgets behave well… :sunglasses:

It happens very very slightly if I manage to get the player in the opposite diagonal

Maybe it’s because I’m using 5.3.2?..

Thank you so much! For this sample project i just went on a deletion frenzy of everything not directly related to what i have there in the example :rofl: some times i hate that the solution is often to just update. Going from 5 to 5.1, i lost a lot of compatibility with market place assets and had to work around it. Maybe it is time to just update and deal with it… thanks for the input!

1 Like

https://forums.unrealengine.com/t/user-widget-component-movement/1684645/6?u=freevageeter

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.