Hi, I have a GvrMain and Gaze Control. When the last is triggered (onEnter) I wish the canvas to appear in front of the user (doesn’t matter from which angle gaze input is triggered).
I have tried to make the Canvas a child of the GVRMain - does not look good (see an image attached). If I do Canvas a child of the Main Camera - Gaze Control stops being triggered. So far the code attached to the Canvas:
using UnityEngine;
using System.Collections;
public class NiftyNoteFacingCamera : MonoBehaviour {
public Camera cameraToLookAt;
// Update is called once per frame
void Update () {
Vector3 v = cameraToLookAt.transform.position - transform.position;
v.x = v.z = 0.0f;
transform.LookAt( cameraToLookAt.transform.position - v );
//transform.Rotate(0,180,0);
transform.rotation =(cameraToLookAt.transform.rotation);
}
}
Any ideas? Thank you