Best way to place GUI objects on top of a sprite?

I’m looking to put damage numbers, name, etc above the player sprite’s head. What’s the best way to go about this? Thanks!

Hi, Would you have a PG to share?
Does it have to be a GUI (because of interaction and animation) or could it be a dynamicTexture?
If it’s GUI I believe it would be GUI for mesh. Something like a clone of the sprite (plane) with a z-offset and linked to it. Is the sprite always facing the cam? I guess a PG would come in handy if it’s ok with you… Meanwhile, have a great day :sunglasses:

2 Likes


Like above the character’s heads.

Like control.linkToMesh but for sprites.

Can you explain a bit more. Obviously, link will not work with sprites. But I’m sure there’s at least a couple of go-arounds. So, how did you do it. Is each different object generated from a single spriteManager. One that generates all trees, another that generates all crabs, etc…?
And then what, when you click on any of these ‘pickable sprites’ you would get some information on this class of object? Am I close, or not at all?

Edit: Sorry I just did read again. You want it only for your player, is it? But then, I would have a question: Why is the player a sprite?

I think a possible solution could be to project your sprite position to screen and use it as GUI element left / top:

1 Like

Yes, my thoughts were something similar. I just wanted to better understand the overall use.
But thanks for taking over. I think this could work depending on the camera. It will work better with a top down or isometric view (here the zoom kind of messes it up sometimes :grin:

Yeah, here how I tried to consider camera radius, but idk if he uses ArcRotateCamera? Well if not you could take distance from camera.position to playerSprite.position instead of radius.

I need to display damage numbers and other status effects in a stackpanel over the character’s head.

This works great.

1 Like