With the earlier version, that pop ed up everywhere worked only with pressing a key, with left mouse button that didn’t work
This is the earlier version, it pops up everywhere, now I deleted the ground cube object,
this one seemed to work, only with key press tho, and it didnt focus the center of the object, and also could click in the path(big cube)
this is the one, where i deleted the path (big cube) and its just empty space but the widget still pops up in the same spot like in the image below, doesnt matter where do i click in the path
If its possible, when i click on an object, it gets the objects middle not the side of it or something, so the widget shows up in the same spot, and not depending on my click
That should do it, are you sure about the tag being correct and present on all components?
I put a cube ont he map and duplicated
it many times, the ones that supposed
to open widget have tags
You used a basic cubs from the Modes tab?
Use HitComponent->GetWorldLocation for this.
Yes i used that , after all the cubes were on the map i seoected all of themamd gave them a tag
Them and *
Your tag reads tag01 but in the previous screenshot it was kenyer when you tried to detect it.
Good. I was getting worried.
You will need to compare and adjust screen location and shift the widget up, down, left, right.
If the Screen Location X is less than half the widget size, you shift it by that amount to the right and so on.
You use input touch on mobile, right?
I just dropped some basic cubes, gave them a tag:
And here’s the entire code:
My advice at this point would be to put Print nodes everywhere and do some debugging.
what blueprint are you in?
when I put the “component has tag” node in it stops working
oh actually, its working finally, but ive got another problem, and if i click on a cube on the right side, it goes out of the screen, same for the ones on the botton
If i want to set it to actor on click event, or touch event nothing happens, on phone i wont have a cursor so this is a problem
with touch 1 event it seems like ok, but still
that part of the widget is out of the screen, same for the bottom side
As I said above:
You will need to compare and adjust
screen location and shift the widget
up, down, left, right. If the Screen
Location X is less than half the
widget size, you shift it by that
amount to the right and so on.
I have to do that in blueprints or in widget options?