Making widget component stay above rotating actor?

Hello,

So I have a widget component attached to an actor, in this case a dropped loot item. Now this has physics enabled so if I run into it and flip it over, the widget will move with the item and end up closer to the ground or to the side of the item rather than on top.

Is there any way I can make the widget component stay on top of the actor, no matter who it is rotated? It is already set to draw to screen rather than world of course.

Try changing the rotation type of the widget’s transform to World:

268786-untitled.png

This should stop the widget component inheriting rotation from the tumbling parent. Never tested it with screen space widgets but it works with the world-space ones.

I’m actually surprised the screen space is affected, tbh!

I did something like this last year. Can’t access old gyazo gifs to demonstrate :expressionless: But here is an atrocious quality mini thumb:

Sounds reasonable, I’ll have to play around with that. Basically what happened is that I used a standard cube as a placeholder for an item I hadon’t designed yet just to test out some loot mechanics and I flipped a few of them over and the widget indicating the item and the amount followed it around.

Hopefuly this will work, it looks kinda silly right now.

That didn’t actually solve anything… I’ve taken a screenshot to better illustrate what is happening. As you can see, the right item widget has been rotated into the ground as the object rotates, which should not happen.

I’m guessing the issue may be because I’ve set my static mesh to be my root, due to physics simulation. If I were to make it something else, that probably wouldn’t happen.

However, the reason I have set my mesh as my root is that when I enable physics on the mesh, it can detach from the root and so the widget can be on one side of the map while the item is on the other. Even a small movement makes it look terrible.

268807-widgetrotation.png

Yes precisely.

Not really.

268808-actor1.png

Is this what you’re after:

Image from Gyazo

This is with a widget component set to screen space. It seems to work fine regardless of the static mesh being the root or not. Also, I did not need to change the relative / world rotation as I suggested in my original post (it would be needed if you needed this in world-space). It seems to work out of the box on my end.

Anything else that is unique about the setup you have there?

edit: just to confirm:

268827-capture.png

Added more info.

I think you’re using a Z offset for the widget component.

268828-capture.png

Ensure the Draw at Desired Size is unticked. Increase the Draw Size Y and / or set Pivot Size Y to 1.

268828-capture.png

For starters, set pivot Y to 1 (so the root of the widget is at its bottom) and/or increase the DrawSize Y.

You could also alter the widget itself, and give it some bottom padding.

Oh yeah, that looks about right! Good luck with the rest.

Yes I am, is there any other way to get it to appear above it?

Yes I was and I was looking for an alternative to have it appear higher, but I just set the Z to 0 instead. Sure it appears kinda on the ground, but it’s fine… I suppose. I’m just a nitpicky ■■■■■■■.

Yesterday I spent hours agonizing over character finger movement.

Yeah I tuned it to 1,5 and it appears as it was now. Thanks a lot.

But upon closer examination I decided that having it lower would actually be more helpful to the player.

Thank buddy, this was really helpful!