Enhanced Input Trigger Fires Multiple Time Simultaneously

I only found one other post mentioning this from back in 2020 so trying to see if there are any new solutions/answers out there for this.

I have an event that is fired when the user pulls the trigger (Oculus VR). I have followed the advice in the aforementioned article as well as the UE documentation and I am still having problems. I have set the Trigger to “Pressed” and tried different actuation settings and nothing works. The most frustrating part is that its intermittent. It works fine for a period of time and then just starts firing of multiple simultaneous “trigger” events. See the log below - this is the output values from the trigger….. you’ll see where it fires twice and has the exact same values which is making it impossible for me to add flags or anything else to try and catch this. I’ve tried several method but because it is spawning separate threads at the exact same time the variables/flags and other methods I’ve tried aren’t working.

Any body figure out how to get the trigger to work properly in UE5.x using the Enhanced Input System? Is there an older, more reliable method I can still use for VR?

LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.14359,0.014268,0.014268
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.204151,0.013468,0.013468
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.156776,0.013457,0.013457
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.299389,0.014477,0.014477
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.126007,0.014208,0.014208
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.141636,0.014337,0.014337
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.343101,0.014221,0.014221
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.147253,0.013318,0.013318
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.139682,0.01392,0.01392
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.378999,0.013755,0.013755
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.378999,0.013755,0.013755

LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.165812,0.01364,0.01364
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.165812,0.01364,0.01364
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.455189,0.013567,0.013567
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.455189,0.013567,0.013567

LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.189011,0.014513,0.014513
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.189011,0.014513,0.014513
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.133822,0.013479,0.013479
LogBlueprintUserMessages: [AC_ActorSelection] Trigger=0.133822,0.013479,0.013479

OK. this gets even more bizarre/confusing. So I put a trap right next to the trigger and used a variable to store and compare the action value. When these two threads are spawned at the same time, instead of creating a wait state for one thread, it simply returns a zero (or null) answer! Where you see the =?0.0 those are the times the trigger fired twice on one “press”.

WTH?!! This definitely should not be happening!

Here is the output and below is the code:

LogBlueprintUserMessages: [AC_ActorSelection] 0.176801=?11.403991
LogBlueprintUserMessages: [AC_ActorSelection] 0.154823=?18.347633
LogBlueprintUserMessages: [AC_ActorSelection] 0.14188=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.232479=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.126496=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.205617=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.104029=?21.207412
LogBlueprintUserMessages: [AC_ActorSelection] 0.257875=?31.993137
LogBlueprintUserMessages: [AC_ActorSelection] 0.106227=?58.854975
LogBlueprintUserMessages: [AC_ActorSelection] 0.260317=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.157265=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.251282=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.122344=?0.0
LogBlueprintUserMessages: [AC_ActorSelection] 0.233211=?93.81436
LogBlueprintUserMessages: [AC_ActorSelection] 0.126251=?48.271194
LogBlueprintUserMessages: [AC_ActorSelection] 0.867888=?108.662361
LogBlueprintUserMessages: [AC_ActorSelection] 0.199023=?110.773047
LogBlueprintUserMessages: [AC_ActorSelection] 0.199023=?0.0

OK - turns out UE is operating just fine!

I followed a tutorial on implementing a ray tracer to hit objects in VR. The way the code was implemented was causing the input to be turned on and off rapidly when an object was hit (and if you have the trigger being pulled in it picks up a new trigger start everytime that happens)

Tried to delete the post but don’t have permissions!

1 Like