Search Unity

Unity Remote 4 + No gyroscope input in Unity 5 ?

Discussion in 'Android' started by Quazar_100, Dec 17, 2015.

  1. Quazar_100

    Quazar_100

    Joined:
    Jun 12, 2015
    Posts:
    7
    Hello guys,

    I am desperately searching for a solution & hope you can tell me what to do / try next.

    Basically, I have touch input in my test VR scenes working, but no gyroscope is responding when playing the Dive Demo. I can compile to apk & gyro works then in-game as expected.

    I tried almost everything, but still no reactions from it when using Unity Remote 4.
    All common issues discussed hadn't solved the problem like samsung drivers, android SDK updates, unity project settings, JDK x86 / 64, android developer options, firewall settings android / win7, re-install of drivers / JDK / Unity, MTP / PTP android usb options, etc.)

    I have tried with another smartphone, same result.
    I recently removed a non plug-play driver in device manager hidden devices that was creating errors in my event log on WIn7 x64. The name was something like TVicPort.sys.

    Could it be related ?

    Thanks
     
  2. Quazar_100

    Quazar_100

    Joined:
    Jun 12, 2015
    Posts:
    7
    Sadly it's not solved yet & I'm getting little crazy on this issue.
    The driver TVicPort64.sys in hidden devices on my Win7 is back but that didn't helped me.
    Now in Unity, I tested this script on the Dive 2.0 Demo scene attached to the plane :

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class TestGyro : MonoBehaviour {
    5.  
    6.     private Gyroscope gyo1;
    7.     private bool gyoBool;
    8.     //private Quaternion rotFix;
    9.  
    10.     // Use this for initialization
    11.     void Start ()
    12.     {
    13.         gyoBool = SystemInfo.supportsGyroscope;
    14.      
    15.         if( gyoBool ) {
    16.             gyo1=Input.gyro;
    17.             gyo1.enabled = true;
    18.         }
    19.      
    20. //        Debug.Log (gyoBool.ToString ());
    21.     }
    22.  
    23.     // Update is called once per frame
    24.     void Update ()
    25.     {
    26.         print (gyoBool);
    27.      
    28.     }
    29.  
    30.     void OnGUI ()
    31.     {
    32.         if (gyoBool != null)
    33.         {
    34.             GUI.Label (new Rect (10, Screen.height / 2 - 50, 100, 100), gyoBool.ToString ());
    35.             if (gyoBool == true)
    36.             {
    37.              
    38.                 GUI.Label (new Rect (10, Screen.height / 2-100, 500, 100), "gyro supported");
    39.                 GUI.Label (new Rect (10, Screen.height / 2, 500, 100), "rotation rate:" + gyo1.rotationRate.ToString ());
    40.                 GUI.Label (new Rect (10, Screen.height / 2 + 50, 500, 100), "gravity:      " + gyo1.gravity.ToString ());
    41.                 GUI.Label (new Rect (10, Screen.height / 2 + 100, 500, 100), "attitude:     " + gyo1.attitude.ToString ());
    42.                 GUI.Label (new Rect (10, Screen.height / 2 + 150, 500, 100), "type:         " + gyo1.GetType ().ToString ());
    43.             }
    44.             else
    45.                 GUI.Label (new Rect (Screen.width / 2 - 100, Screen.height / 2, 100, 100), "not supported");
    46.         }
    47.     }
    48.  
    49. }
    When entering in Play mode, I still got the strange error saying No Gyro from the Dive scripts...
    Even though at playtime, it displays Gyro True & gives me all live values of my S4 gyro when I rotate / move it... but I can't control my VR camera character via my rooted Galaxy S4.

    So, what's going on ?
    Any ideas, any suggestions ?

    P.S.:
    • I installed more JDKs & tried to set it in Unity +5 JDK folder
    • I installed the NET 4.5.2
     
    Last edited: Jan 18, 2016
  3. Quazar_100

    Quazar_100

    Joined:
    Jun 12, 2015
    Posts:
    7
    *** BUMP ***

    Help is welcomed as I'm developing a new VR game for all of us !
    Without having the gyro working on my phone & unable to control it "live" when debugging, makes things way too difficult to continue development.