I've made a simple application in unity for Google CardBoards. The scene consists of an object in the center and the main camera of the scene. I have entered all the prefabs of the Google CardBoard SDK. My problem is that I would like the object to make the movements of the head and the camera to be still. There is an app in the store called "CardBoard" that has exactly the operation I want.
The Google SDK has a prefab called GVREditorEmulator, its function is to simulate the movement of the head, my question is how to get orbit around the object, I have two ideas. 1) That the movement of the camera does the object. 2) that the camera orbits around the object.
I have tried to change the movement of the camera to that of my object in the Script, but when I run the app the object does not move or rotate:
public void UpdateEditorEmulation(){
HeadRotation = Quaternion.Euler(mouseY, mouseX, mouseZ);
HeadPosition = HeadRotation * NECK_OFFSET - NECK_OFFSET.y * Vector3.up;
IEnumerator<Camera> validCameras = ValidCameras();
while (validCameras.MoveNext()) {
Camera cam = validCameras.Current;
/* Esta línea movía la cámara */
//cam.transform.localPosition = HeadPosition * cam.transform.lossyScale.y;
MiObjeto.transform.localPosition = HeadPosition * cam.transform.lossyScale.y;
/* Esta línea rotaba la cámara */
//cam.transform.localRotation = HeadRotation;
MiObjeto.transform.localRotation = HeadRotation;
}
Any help for API to look, information, etc? Thank you very much.