- Home /
Google Cardboard not move the camera when I'm using Unity Remote 4
Google Cardboard seems not to be compatible with the Unity Remote 4, for when I move my head a camera does not move.
Answer by musurca · Nov 02, 2015 at 02:46 PM
As of as of Cardboard SDK 0.5.2, there's an easy solution to this problem. Make a new script called GyroscopeEnable.cs and paste the following code:
#if UNITY_EDITOR
using UnityEngine;
using System.Collections;
public class GyroscopeEnable : MonoBehaviour
{
private Gyroscope gyro;
void Start ()
{
if (SystemInfo.supportsGyroscope) {
gyro = Input.gyro;
gyro.enabled = true;
}
}
}
#endif
Attach this script to a new GameObject in the editor. After that, go to line 74 of UnityEditorDevice.cs and change the line to read:
if (RemoteCommunicating) {
Voila, head tracking via Unity Remote 4 should now work.
I did what you suggested. Unfortunately I got the following error:
Quaternion To $$anonymous$$atrix conversion failed because input Quaternion is invalid {0.000000, 0.000000, 0.000000, 0.000000} l=0.000000 UnityEngine.$$anonymous$$atrix4x4:TRS(Vector3, Quaternion, Vector3) Pose3D:Set(Vector3, Quaternion) (at Assets/Cardboard/Scripts/Pose3D.cs:60) $$anonymous$$utablePose3D:Set(Vector3, Quaternion) (at Assets/Cardboard/Scripts/Pose3D.cs:74) UnityEditorDevice:UpdateState() (at Assets/Cardboard/Scripts/VRDevices/UnityEditorDevice.cs:101) Cardboard:UpdateState() (at Assets/Cardboard/Scripts/Cardboard.cs:547) CardboardHead:UpdateHead() (at Assets/Cardboard/Scripts/CardboardHead.cs:98) CardboardHead:LateUpdate() (at Assets/Cardboard/Scripts/CardboardHead.cs:89)
Thank you for posting that in here anyway! ;)
Hmm, what's your setup? I've got it running on Unity 5.2.2f1, using an iPhone 5 running iOS 8.4.1.
I'm with an Android 4.4.4 running in a Samsung s4 with Cyanogen$$anonymous$$od. Unity 5.2.0f3. Windows 7.
Answer by g-pechorin · May 06, 2016 at 10:41 PM
I'm using v0.7 on Windows 7 with a Nexus 5
Changing line 74 (now line 68) of Assets/Cardboard/Scripts/VRDevices/UnityEditorDevice.cs
to read ...
if (/*Cardboard.SDK.UseUnityRemoteInput &&*/ RemoteCommunicating ) {
... seems to do the trick all on its own.
(Without version numbers, working out which line was "74" took a non trivial amount of time so I feel that a new answer is justified. Also, I'm delighted that I don't need another behavior)
@g-pechorin, thank you for this. It helped point me in the right direction as well. Rather than comment out the Cardboard.SD$$anonymous$$.UseUnityRemoteInput, you ins$$anonymous$$d set it to true from your own code somewhere. I added a public UseUnityRemoteInput field on one of my own scripts, and then in the void Start() of that script, set Cardboard.SD$$anonymous$$.UseUnityRemoteInput = this.UseUnityRemoteInput. Now the head tracking works perfectly and I can turn it on or off from within the Unity editor.
Regards
+Steve
Answer by DuFFOwNz · Jul 01, 2015 at 08:13 PM
Apparently that feature is on the way: http://vrfocus.com/archives/15842/unity-remote-coming-to-google-cardboard-sdk/
Are we getting any kind of ETA on when the next version of Unity Remote will be released? I presume that it will be "Unity Remote 5", but we're really pretty much in the dark right now and quite need features like the head tracking.
Answer by StefanoCecere · Jan 22, 2016 at 02:46 PM
works with Unity 5.3.1 and Cardboard SDK 0.6 waiting for official release!
thank you
I have updated it to the 0.6 version. It is not working for me. I have asked to the developers here: https://github.com/googlesamples/cardboard-unity/issues/153
Not work for me (I downloaded all the versions available today to test)
Answer by FiveFingers · Mar 11, 2016 at 09:24 PM
I'm trying with Unity 5.3.3 to get a stereoscopic 360 view for generic iPhone goggles, do you know if this is a good path ?
Your answer
Follow this Question
Related Questions
GyroScop problem 0 Answers
accelerometer video 0 Answers
GearVR gyroscope problems causing motion sickness 1 Answer
UNITY 3D - Set the start positon of the gyroscope to initial phone position 1 Answer