I want to click on an actor on the level with the widget displayed.

I want to start the process by clicking on an actor on the level with the widget always displayed, but I can’t click on the actor because the widget takes the decision.

The widget configuration contains child widgets in the campus panel.
I would like to make click judgments on actors even if they click on places other than the various buttons.
(See image below)

Is there any way to interfere with the actor other than hiding the widget?

1 Like

If your ButtonBox or ClickIcon is taking the whole screen, you can set their visibility to Not-Hit

2 Likes

Thanks for the reply!

You are right, I have all elements set to Not Hit - Testable (SelfOnly) except for the 3 buttons, but I can’t click on the actors in the level.

I checked with the widget reflector and it seems that this widget is covering the screen.

I wish I could access the actor by clicking on all but the three buttons, in the second image: …

Make sure these are setup before:

Controller BP

Widget button anchor doesnt take whole screen

1 Like

Click event settings for player controllers
Anchor settings for each button

All of these settings are exactly as you describe.



does the click on actor work without the ui displayed ?

Yes, with this widget itself removed, the clicks on the actor work as intended.

Do you have any script in the widget? Especially in onMouseDown? For example:

The root element of your widget:

image

Is set to Visible; if your widget does this:

No single click will reach the player controller.


What are the chances the widget itself sets Input Mode to be UI Only?

1 Like

Thanks for the reply!

>What are the chances the widget itself sets Input Mode to be UI Only?

I tried connecting the following nodes but no improvement.

I will also share the specific goal I envision, just in case.

In the first half of the video, when I click on an actor on the level with the corresponding widget visible, it does not respond.

In the second half of the video, if you set the visibility of the widget to Hidden in Debug and click on it, you will see a debug log with blue text that shows that the actor was successfully accessed.
If this debug log flows while this widget is displayed, it is successful.

How do you add this widget to the viewport? Create WidgetAdd To Viewport? Or, perhaps, you used a Widget Component?

I would like to make click judgments on actors even if they click on places other than the various buttons.

Are you using onClicked in the actor for this; is this the part that prints when the widget is not there?


Could you confirm this?


It’s pretty clear. The thing is that there’s nothing in the setup that we can see that could be causing this. This should not be happening under regular circumstances.

Could you do us a favour:

  • create a brand new simple widget with just a Canvas + one Button
  • leave all visibility settings at default
  • add it to the viewport instead of the Camera Change widget

Does this new widget allow you to click through?

1 Like

How do you add this widget to the viewport? Create WidgetAdd To Viewport ? Or, perhaps, you used a Widget Component ?

Create Widget → Widget Animation to toggle display/hide.
Add to vieport is not used.

Are you using onClicked in the actor for this

Yes, OnClicked is implemented for actors that are clicked.

is this the part that prints when the widget is not there?

If you are referring to the debug log in blue, you are correct. In the video, the log printed when the widget is hidden is evidence that the actor’s OnClicked was activated.

Do you have any script in the widget? Especially in onMouseDown?
Could you confirm this?

There are six events implemented in the widget.

➀Process to store child widgets in ButtonBox

②③④OnPressed processing of three buttons

⑤⑥Showing and hiding child widgets stored in ButtonBox

Could you do us a favour:
create a brand new simple widget with just a Canvas + one Button
leave all visibility settings at default
add it to the viewport instead of the Camera Change widget
Does this new widget allow you to click through?

We have verified this and will share the video.
In the beginning of the video, the actor does not respond when there is a widget.

In the middle of the video, only the widget of campus panel + button is shown, but I could not click through.

image

At the end of the video, with the widget removed, the actor responds without any problem.

This does not add up. Could you please explain how this widget is created and shown. If Add to Viewport is not used, how does the widget end up on the screen?

Essentially, this behaviour is caused by something that has yet to mentioned here.

• are there any plugins in use?
• C++?


image

Regarding, this - why is the Canvas Visible - are these default settings in your project? Could you try it with this new widget but with canvas set to Not Hit-Testable (Self Only)

I sense there are important things about the project you never mentioned. Something along the lines of… “oh, I’m using Horror Engine, btw…” :innocent:

1 Like

Oh, I was able to find the problem and solve it!

The widget in question was implemented to switch visibility depending on the action in the game, but the visibility setting was set to “Visible” when displayed: …

I re-set it to “Not Hit Testable (Self Only)” and verified that it behaves as intended!

I had been verifying the widget’s own settings all along, but there was a problem with the implementation on the visibility control side.

Sorry for the hassle caused by this easy mistake.
Your response was very helpful!

2 Likes

:person_shrugging:


Glad to hear you fixed it!

1 Like

I am really sorry about that.
I was mistaken. …

1 Like