How can I make click on a widget using an overlap box instead of a button in the controller?

Hi there.

That is the question: How can I make click on a widget using an overlap box instead of a button in the controller?

This is specifically oriented towards the web browser plugin, and I already asked for this in the forum, but I receive no answer, so I though in asking the question in a different and more broad way.

Some help could be really appreciated, I´m trying to mimic a tablet behaviour with the web browser widget, I can make click in the browser using a button, but I want to do it making an overlap with a detector and an object.

Best regards and thanks!!!

P.S.: again… help please!

Hello Juangea,

Is there a reason you can’t use a button? Having the explanation of why you’re trying to do this could lead to a better solution.

As far as using an overlap box, this will only work if you’re using a world space 3D widget or you are in a level where you know where your camera will be when operating this widget. The reason why is that a collision box has to be in the 3D world space and you need to know where you need to spawn it for it to line up with your widget. Is that the kind of case you’re planning on?

Also, what do you mean by “button in the controller”? Do you mean a button on a gamepad? If so, you can also click “Buttons” (as in the actual “Button” part of a widget, from the pallet) with your mouse.

Hi Matthew.

I think I explained it in the question :slight_smile: the thing is that I want to use the web browser widget as a 3d widget to simulate an ipad behaviour (approximately) so in VR when I touch (or nearly touch) the widget a click is triggered.

I already have a trace, I can make click on the browser using a button in the motion controller, but I’m not being able to trigger the click using an overlap box.

With the controller I mean a motion controller, this is for vr, but in general a controller, could have been a gamepad too :slight_smile:

Hope this clarifies a bit more the question.

Thanks for the help!

Thank you for that explanation. I believe what you’re looking for is the Press Pointer Key and Release Pointer Key events. Please note that these are different from the normal Press Key functions and are meant directly for mouse interaction. Those can be found using the Widget Interaction Component.

If the issue is that you’re not able to literally trigger the click event, you could instead make the logic called on your click event into its own function and then fake a click by calling that function whenever your overlap is called.

Thanks Matthew!

I’ll try it right away and come back to confirm the solution if it works :slight_smile:

Thanks a lot!

It works! Not perfectly though because there are some times when the click is not detected, but it´s a minor glitch that I´ll investigate, the part that I was missing was the Release Pointer Key and the delay.

Thanks again!

How could this be made to work without a “left mouse” click and merely the overlap of a motion controller with the widget/ collision box ?

It would be great to almost “feel” the overlap too… a simple controller rumble added to a change in the button, be it color or location so the VR hand “pushes” the button in and feels the rumble

please,i have a problem with unreal engine,he want download,he says:not download