I’m sure this is really obvious, so forgive my newbness - I did search, I promise. I’m making a VR app, and this widget is set to unhide when the trigger box is activated, but I want to got a step further and only unhide it when the the motion controller trigger is also pushed (pulled??). Surely there’s an easy way to set two conditions, so that the user has to point at it AND click, so that it doesn’t get accidentally triggered all the time?
You could set a boolean based on the Pressed/Resealed events of that input, and use a Branch node to gate the execution of the rest of the graph.
Create a Boolean variable that is set ‘true’ when pressed and false when released, then have a branch node immediately after the overlap event check and see if the variable is true if yes continue execution if false do nothing. This way only overlaps occurring when the controller is being pressed will execute.
Literally what I was typing out…guess you beat me to it haha
Lets say, for example, that I didn’t know how to create such a variable… would you be able to expand on your explanation a little? Thank you!
You may want to look at the basic blueprint scripting documentation to familiarize yourself with the basic concepts.
Well, based on my limited understanding, this is what I think should work! However it doesn’t seem to unhide the widget. The other problem I see with this solution is that I can no longer use the trigger for widget interactions.
The OnComponentBeginOverlap will only fire once at the moment the overlap starts. If you want it to trigger at any time while overlapping, you may need to keep track of the overlapped state and monitor that on tick.
This works, thank you! The trigger is no longer working on the widget buttons, but I guess that’s a whole different problem to solve!
This series might be beneficial if you are new to the engine. Videos 2 and 3 go over various variables and how to create them.
Unreal Engine 4 Beginner Tutorials: https://www.youtube.com/playlist?list=PLyu-W38DvZhqByAoeva1jewB5s78zQHIy