Now, i created a new project, tried doing the same thing and it doesn’t work the same way… i just don’t know why. It’s bassicaly a checkbox to interact with pressing the key E, and now it only is hittable by its… back?. Here are the screenshots:
Hey there @Merrickl! Could the background UI element be absorbing the hit? You could try making the background non-hit testable like this. It’s usually for the cursor and not traces however.
Hi! Thank you for your support!
Sadly neither of those options worked.
I’m stunned by the result, why would it detect a hit by its back?
Here’s a video of the SAME code but in a different project, and it works as expected:
See my last comment in the previous thread. You’re using Get (all) Actors of Class - this will never work. Wouldn’t it be neater (and easier) to use the suggested Widget Interaction Component:
You wouldn’t need all that script and also get the proper interaction which evokes the other behaviours, like enter / leave and focus propagation. Consider it.
Do not connect Key pins - see my example. A checkbox has no idea what E means. It only knows what LMB is. Use E, just do not connect it.
What would the code for ActorBP and WidgetBP be?
You do not need any other script, the Toggle, the component hit (unless you need physical interaction with the widget).
Also, do not use Get All Actor of Class, you never need it unless you want to do something to ALL actor. You have references to the OnComponentHit node itself. Not needed here but that’s what they are for.
Hey Everynone, i really appreciate your help, it finally worked
I’m really new to using UE5 since all my career has been dedicated to psychology and mental health, not programming, lol. So thank you very much for taking your time to explain! To you too SupportiveEntity!
But… just for clarifying, since a checkbox doesn’t know what E means, does it only work with clicks?