playMaker

Author Topic: Unity: Vive Controller Button Event with Multiple States Causing Infinite Loop  (Read 3375 times)

blupixelz

  • Playmaker Newbie
  • *
  • Posts: 2
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!
« Last Edit: July 18, 2016, 02:43:49 AM by blupixelz »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
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 :)


blupixelz

  • Playmaker Newbie
  • *
  • Posts: 2
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. :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Hi,
Happy to help :)