private void Start() { if (linkedScript.m_head == null) { VirtualRealityTags.GetClassicVrTag(VirtualRealityClassicTags.EyesCenter, out foundHead, out linkedScript.m_head); } }
private void Awake() { userView = this.gameObject; _mat = objectTarget.GetComponent <Renderer>().material; objectDirection = objectTarget.transform.position - userView.transform.position; VirtualRealityTags.GetClassicVrTag(VirtualRealityClassicTags.EyesCenter, out found, out given); CheckAngle(); }
private void Update() { objectTarget = IsHighlighTag.GetAllHighlightable().Select(k => k.gameObject).ToArray(); _mat = new Material[objectTarget.Length]; userView = this.gameObject; for (int i = 0; i < objectTarget.Length; i++) { _mat[i] = objectTarget[i].GetComponent <Renderer>().material; objectDirection[i] = objectTarget[i].transform.position - userView.transform.position; VirtualRealityTags.GetClassicVrTag(VirtualRealityClassicTags.EyesCenter, out found, out given); CheckAngle(i); } }