Only parts of actor are accepting On Click / only sometimes

Hello,
I have an actor with a limited number of primitives and a widget component:
Actor Block
What feels like 95% of the time, it will accept clicks as expected. However, sometimes it doesn’t register the click at all. Here are some bizarre observations:

  • clicking multiple times does nothing
  • rarely, waiting several seconds and then clicking works
  • occasionally clicking on the outer cube instead of the inner one with the dot (without waiting) works
  • frequently clicking on the display number / smaller lower-left cube (without waiting) works
  • always, clicking on a different instance of this actor has the other instance trigger its click

I have tried a few settings on the widget component, in case it was somehow blocking clicks:

  • Interaction> Receive hardware input is false
  • Interaction> Window focusable is false
  • Interaction> Window visibility is self hit test invisible
  • The widget itself is set to not hit testable (self & all children)

I’m running out of ideas as to what might be causing this. The camera is fixed in place and clicking works most of the time, so I don’t think it’s an offset issue. Is there a debug setting that will report which actor IS absorbing the clicks?

And while checking things while writing this, I just noticed an instance of an entirely different actor not responding to clicks, one which has always accepted them before (and doesn’t have a widget component).

Open to trying whatever.
Thanks

  • run widget reflector to see if the interface gets the click
  • line trace components to see where the clicks end up

Widget reflector doesn’t show any widgets as blocking the click or active/focused at any inappropriate time.

Line trace says I’m clicking on the correct thing.

When I set a “print” at the very start of actor on-clicked, it (of course) prints when the actor successfully receives the click, but does not print when click isn’t registering.

Given that widget reflector shows nothing blocking, and line trace says it’s clicking on the correct actor… I don’t know. Is there some process that can prevent clicks from being received? But when I click on another actor, it immediately receives and acts on the click…

Switch to line trace rather than onClick, see what you get. Same behaviour? If so, print hit component name.

Ugh. Okay, I don’t know why this didn’t show up in the first trace, but this is on me. Turns out there’s an invisible actor blocking clicks, but because it moves, it’s not always blocking the same thing, which explains the irregularity.

So I suppose all I need to do now is figure out how to make something that’s not visible also not block clicks.

Appreciate the help, thank you!

Look into collision filtering, lots of granularity regarding who blocks whom.

Good luck!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.