How do I get "line trace by channel" to "press" an in level widget button?

Hello, I am currently trying to implement a gun in VR and I have need for it to shoot buttons that are as currently set up in a widget blueprint attached to a blueprint actor object so I can place them in the world

how can I get it so the “line trace by channel” blueprint node that I am using to detect what i have hit will trigger a button press?

I have no idea how to set something like this up correctly but i currently have a keypad (a bunch of buttons in a grid) and it is in a blueprint with a widget interaction thingy and the widget itself

image

its sort of set up like that?

keypad is like this in the blueprints


that’s how i sort of have the line trace thing set up i just check to see what I have hit (is it target type A or type B and then for my purposes i keep a count of what I have hit along with telling what i have hit to delete itself)

I don’t really know what information about how i have things set up is wanted by people so please ask for any additional information (and I am sorry in advance for the blueprint spaghetti)

Using widget interaction on the motion controllers works

I imagine what i should be trying to do is take something from “break hit result” (hit component or hit actor) seeing somehow if it is a button and just getting it to trigger the “on button pressed” or “on button clicked” event

1 Like

well i tried just adding a widget interaction component to the gun and have the gun “fire off” a mouse click when the gun is shot but it does not appear to be working, not sure why

(the debug line shows its hitting the UI elements (the sphere appears it wasn’t at first because interaction distance was not long enough, however the buttons do not react with the slight highlight that they do with the widget interaction on the controllers)) but pressing the trigger that does everything else the gun should do after the press and release key node (show a debug trace and spawn an explosion at the hit location) happens just not the widget stuff

the widget interaction on the controllers works