Hello, i have an image attached to a moving object through a widget. Now, I want the image to be clickable, so i replaced the image with a button but somehow It doesn’t work (the button isn’t clickable) I don’t know if there’s something about moving buttons but I don’t know what’s the problem. I’ve also tried widget interactive but so far nothing.
Any suggestions ?
Hello, i have an image attached to a moving object through a widget.
Not sure how to interpret that. Are you talking about a widget component?
To be clickable, the visibility mode needs to be set to “visible” not the default “no hit test”. Make sure there are no other widget in the way that might be blocking the mouse click events. If so, you can try to adjust the “z order” with higher values for your desired widget.
Also, if you have a movable object, your player may need a widget interaction component to interact with widget in world space.
Yes it’s a widget component
So i have a widget blueprint with just a button:
and a blueprint class that has the a widget component with this widget class, and since it doesn’t work, in the same blueprint, i added a widget interactive like so:
widget component:
widget interaction:
And also, i can’t see the debug.
and this is how i use the widget interaction:
You do not need an interaction component if you enable hardware input. Interaction component simulates mouse where there is none.
still not working
even if the button is moving ?
Why not tick the box and test it?
I did and it’s not working
Default expected behaviour with Receive Hardware Input
, no interaction comp:
Can you run a clean project and replicated this? At least we’ll know if it’s the engine version or something else in your project so we can start digging.
Also, if you’re using interaction component, you will want to adjust this:
Perhaps it’s the distance, and you’re not even using the mouse. Not sure what Scale does to the comp (probably nothing) but who knows what lurks in the code below…
Mine is not even clickable
this is how i called my widget in level bp, maybe i did somthing wrong?
and i took down the interaction widget
As above, test a simple moving widget comp with a button in a clean project and let us know if it works there.
For all we know atm, you may have a transparent full screen widget consuming all input, and spend 2h trying to stab things in the dark
can you show me the bp you used for this ?
There is no script. All bar Receive Hardware Input
is at default. The widget has a button:
I admit this is one of the more annoying things to debug because the Widget Reflector tool is pretty much useless in such cases
it’s not moving lol but it’s working
but in my project, i stopped the movement and it’s not working…snif
To and from and the same.
woopsy, moving and working
Can you show the collision setting of the widget component in your project?
Are you using a player controller?
woopsy, moving and working
Now we start digging!