Cardboard VR: "LookWalk" works in Unity, but not when I build & run to a mobile phone
Hello, I'm a newbie making a simple Cardboard game for my school project. I'm using Unity 5.6.1f1 Personal on Windows 7.
I've been following some YouTube tutorials and I made a couple of levels with objects like cubes and planes etc to get a feel for how things work.
I wanted to implement a couple of different ways to move/walk and the first one was the so called look-walk where you move by looking at a certain angle. I followed this youtube tutorial: https://www.youtube.com/watch?v=kBTn2pGwZUk
It works fine in Unity's game view/editor and it was also working on my phone a couple of days ago in one of my earliest Unity projects. Now that I've familiarized myself with the program a bit more I wanted to implement this mechanic again and I found out that it doesn't work anymore in any of my projects when I build & run to my phone. I tried it on Nexus 5 and Nexus 5X.
It still works fine in Unity though.
The project has 3 very basic scenes and I think all of my build settings are correct.
I'll gladly provide more info about the project, but I don't know what's needed in this situation.
Answer by IggySLO · Oct 29, 2017 at 12:36 PM
I found a solution that worked for me in the YouTube comments of the video linked above in the OP.
1) create a new empty object and move Main Camera to that object so Main Camera will be the child of the newly created object.
2) remove the CharacterController in Main Camera, then add CharacterController in the new object
3) edit the script, change to this "public CharacterController cc;" and "cc = GetComponentInParent ();"
4) build and run