UI Widgets with Button, cannot make it work


This might not be a bug, but I cannot make a button work on an UI Widget.

At the same time, somebody in Discord said “it only works with requiresCursor option selected”; which is an option that does not show up in UI Widgets of type “World - Camera Facing”.

I might not be interacting correctly with the UI Widget, but I guess it’s just about pressing “E” focused on it while previewing, right?

I have a door , which has the UI widget. Here (attached) is what I’m trying to achieve (and how I am pressing the buttons), and the associated javascript code of the UI Widget.

Am I doing something wrong?

I took this UI Widget, made it of type “Screen”, checked the “requiresCursor” check, and I was able to press the buttons with the ALT key.

So I’m really starting to think that there might be a bug with Camera Facing UI Widgets that do not allow users to press buttons.

Thanks for any help!

World (Camera Facing) UIs are converted to billboard sprites so they can always face the camera, because of this they cannot accept user inputs as they aren’t a physical part of the world.

Standard “World” or “Screen” can take input, as they have physical mapping to the user’s screen and position.

Thanks (also for answering this in Discord). I would suggest you add this info somewhere in the docs.

Regards and thanks!

And I can confirm that making it a “World” UI Widget made it work.