How can I detect when TriggerAxis reaches 0? -or- How to detect when an event stops firing?

Ok. So I am developing for the Vive, but this should be a question that applies to all controllers that have a “TriggerAxis” Event.

Here is my problem- I want to perform an action when the triggeraxis is between 0 and 1. I have a seperate action that happens when the axis reaches 1 (fully pressed down)

However the TriggerAxis never truly reaches 0 because the event only fires when the trigger is depressed, and when it is not there isn’t a way to . So how do I determine when the trigger is no longer being pressed?

My initial thought is to have a gate node, where firing the event triggeraxis node will open the gate, and I’ll have a branch to determine whether the value is 1 or not. Then I was thinking of using event tick to fire a custom event to check the inputaxis value but that seems like a bad way to do it.

Also one more thing the Vive has both trigger axis and trigger down, so if I use Trigger release I thought maybe that would be the right way to go but trigger release just means it is no longer 1 which isn’t good enough for my purposes.

Just imagine the compare exec is tied to a custom event

What should I do?

Check if the Axis Value is 0? Just use an == node.

If for some reason you dont GET 0, then simply check if it is less than some small value.

I don’t know how accurate the triggeraxis is on the Vive Controllers, but I am going to try the “close enough” method and get back to you to see if it works.

use IsNearlyEqual node. it compares floats with a custom error tolerance.