Hi,
I'm using Input.Touches asset with Playmaker.
I'm getting swipe magnitude by using
Input Touches Get Magnitude and if the magnitude is below certain value, it will run Pass, else Not Pass.
In first state I get the magnitude and store into global variable swipeMagnitudeGvar.
And in my next state, I use the global variable value to compare with a certain number.
In my
FloatCompare,
if(swipeMagnitudeGvar == 20) return Not Pass.
else if(swipeMagnitudeGvar < 20) return Pass.
else if(swipeMagnitudeGvar >20) return Not Pass.
Tolerance = 0.The problem:
Eveytime I swipe and get the magnitude,
FloatCompare is taking the previous value to compare.
e.g
i. Before first-time swipe, initial
swipeMagnitudeGvar is 0. So I will get pass no matter what for the first time swipe gesture.
ii. Second and subsequently, it will still get the previous value to compare.
Below is my FSM:
1. Get Magnitude when detecting swipe gesture.
As you can above the value is 121 but it return Pass.
2. This is the state that contains FloatCompare:
Does that means when the FSM is active, the whole FSM mechanism will proceed by "existing" value instead of updated value? How can I pass updated / changed value from state A to state B?
Please help. Thank you.