It not gets my objects locations, it
only gets my cursors.
Well, you click on the object, the widget appears where you clicked, that’s where the cursor is, right?. Your objects need to have collision set up for this to work, naturally. Print HitActor → GetObjectName to see what you are hitting.
Or perhaps you missed the paragraph under the second image I posted, about adding the offset. If you want the widget to appear dead centre, you’d have to subtract half its size before you push the coordinates back to the viewport.
This is a very simplified version with several drawbacks. When you pan your screen, for example, the widget will stay in place, it will not track the object you initially clicked on. This is easy to sort out, though.
Are your squares separate objects or just StaticMeshes you dropped in the map?
There are several methods of doing what you want, this one gives you a direct access to the actor you clicked on, too. (Hit Actor)
Alternatively, you could cover the screen with a Widget Canvas, detect where you click, deproject to world or trace. But that’s somewhat unnecessary more convoluted.
Did you manage to get the widget to show up at all?