Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by omar.abouelleil · Feb 06, 2016 at 02:40 PM · vrcontrolsvirtualrealitysamsung

How to detect a tap or up, down, left, right swipe for Gear VR?

I want to be able to use a tap or swipe as controls for several things in a project on Unity. All I know is that the touchpad on the Gear VR simulates a mouse, but i don't get how it would be detected. This is the Gear VR for GS6, S6 edge, S6 edge+ and Note 5. Not the Note 4.

ps. I am still a beginner in Unity, so please try to keep any explanation simple if you can

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by drawtheplay · Feb 06, 2016 at 03:16 PM

Gear VR handles input processing that you can tie into check their documentation. https://developer.oculus.com/documentation/game-engines/latest/concepts/unity-ovrinput/

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image omar.abouelleil · Feb 06, 2016 at 03:27 PM 0
Share

This only explains the use of a controller, but not the touchpad on the side of the Gear VR,

avatar image
0

Answer by trevorchico · Feb 08, 2017 at 05:25 PM

First download and import "Oculus Utilities for Unity 5" v1.10

https://developer3.oculus.com/downloads/

 void Start () {
         OVRTouchpad.Create();
         OVRTouchpad.TouchHandler += HandleTouchHandler;
     }
 
     void HandleTouchHandler(object sender, System.EventArgs e)
     {
 
         OVRTouchpad.TouchArgs touchArgs = (OVRTouchpad.TouchArgs)e;
         if (touchArgs.TouchType == OVRTouchpad.TouchEvent.SingleTap)
         {
             text2.text = "TAP!";
 
         }
         if (touchArgs.TouchType == OVRTouchpad.TouchEvent.Down)
         {
             text2.text = "Down!";
 
         }
         if (touchArgs.TouchType == OVRTouchpad.TouchEvent.Up)
         {
             text2.text = "UP!";
 
         }
         if (touchArgs.TouchType == OVRTouchpad.TouchEvent.Right)
         {
             text2.text = "Right!";
 
         }
         if (touchArgs.TouchType == OVRTouchpad.TouchEvent.Left)
         {
             text2.text = "Left!";
 
         }
     }
 }










Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image EatMyPixels · Jun 11, 2017 at 10:11 PM 0
Share

This doesnt work with Coroutines or even with changing a scene, It really destroy previous scene Gameobject, Audio...etc. I think the OVRTouchpad.cs is destroying objects.

avatar image
0

Answer by maaz0011 · Sep 13, 2017 at 03:47 PM

this script is not working , to make a single tap i used input (Input.GetKeyUp(KeyCode.Mouse0)) it worked in my case but to make a swipe input i tried y axis as it done in mobile touch

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

46 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Samsung Gear VR – Virtual reality device 1 Answer

[VR] How to make an active rigidbody work in VR, similar to how Nimsony or Boneworks does it? 1 Answer

Why do objects clip through eachother in VR (XR)? (Oculus quest 2) 0 Answers

Gear VR S6 shadow issue 0 Answers

How can i make a prefab solid using trigger and VR 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges