c# - Unity Google Cardboard Button not working -


i have google cardboard v2 touchscreen button (not magnet) , use it. info found outdated. de sdk has changed lot on time. , no don't want use daydream controller.i want use touchscreen button.

i have tried following no luck

int fingercount = 0;         foreach (touch touch in input.touches) {             if (touch.phase != touchphase.ended && touch.phase != touchphase.canceled)                 fingercount++;          }         if (fingercount > 0){             print("user has " + fingercount + " finger(s) touching screen");             transform.translate(0.0f, 0.0f, 2f * time.deltatime);         }         if (input.touches [0].pressure > 0f){             transform.translate(0.0f, 0.0f, 2f * time.deltatime);             print ("user hasdfsf");         }          if (input.getmousebutton(0)){             transform.translate(0.0f, 0.0f, 2f * time.deltatime);         } //      if(gvrcontroller.appbutton){ //          transform.translate(0.0f, 0.0f, 2f * time.deltatime); //      } //      if(gvrcontroller.clickbutton){ //          transform.translate(0.0f, 0.0f, 2f * time.deltatime); //      } //      if(gvrcontroller.istouching){ //          transform.translate(0.0f, 0.0f, 2f * time.deltatime); //      }         if (gvrpointerinputmodule.pointer.istouching) {             transform.translate(0.0f, 0.0f, 2f * time.deltatime);         } 

i suspect sdk prevents normal input.touch fire. don't know how disable it.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -