Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: blupixelz on July 18, 2016, 02:33:22 AM

Title: Unity: Vive Controller Button Event with Multiple States Causing Infinite Loop
Post by: blupixelz on July 18, 2016, 02:33:22 AM
I'm trying to allow the user to press the touchpad each time in order to toggle through a series of models. In other words, each time the user presses a button, it deactivates existing a prefab and then activates the following prefab. For some reason after the third press, the loop assumes that button is being pressed continuously and it stays in infinite loop--causing the prefabs to appear and disappear rapidly.

Here are my screenshots. The actions in the screenshot are being repeated for Swap Food 1, 2 and 3. I'm using the Unity 5.4 with Playmaker for Unity 1.8.1 and Steam VR tools for Playmaker 1.9.

Is there a better method to do this or what am I doing wrong?

Any help would be awesome!
Title: Re: Unity: Vive Controller Button Event with Multiple States Causing Infinite Loop
Post by: djaydino on July 18, 2016, 08:12:11 AM
Hi,
The problem lies in the 'Get Touchpad' Action.
I don't have the 'Steam VR tools for Playmaker' asset so i can not check if there are other actions. I made a quick video to explain :)

Title: Re: Unity: Vive Controller Button Event with Multiple States Causing Infinite Loop
Post by: blupixelz on July 20, 2016, 02:01:50 PM
Hi djaydino,

Thank you very much for your help! I've contacted the developer, but in meantime, I'm going to see if I can modify the function in the built-in class. :)
Title: Re: Unity: Vive Controller Button Event with Multiple States Causing Infinite Loop
Post by: djaydino on July 20, 2016, 07:34:27 PM
Hi,
Happy to help :)