private void UpdateWordResultPoses(Camera arCamera, IEnumerable <QCARManagerImpl.WordResultData> wordResults) { QCARBehaviour qcarbehaviour = (QCARBehaviour)Object.FindObjectOfType(typeof(QCARBehaviour)); if (qcarbehaviour == null) { Debug.LogError("QCAR Behaviour could not be found"); return; } // required information to transform camera frame coordinates into screen space coordinates: Rect bgTextureViewPortRect = qcarbehaviour.GetViewportRectangle(); bool isMirrored = qcarbehaviour.VideoBackGroundMirrored; CameraDevice.VideoModeData videoModeData = qcarbehaviour.GetVideoMode(); foreach (var wrd in wordResults) { var wordResult = (WordResultImpl)mTrackedWords[wrd.id]; var position = arCamera.transform.TransformPoint(wrd.pose.position); var wrdOrientation = wrd.pose.orientation; var rotation = arCamera.transform.rotation * wrdOrientation * Quaternion.AngleAxis(270, Vector3.left); wordResult.SetPose(position, rotation); wordResult.SetStatus(wrd.status); var obb = new OrientedBoundingBox(wrd.orientedBoundingBox.center, wrd.orientedBoundingBox.halfExtents, wrd.orientedBoundingBox.rotation); wordResult.SetObb(QCARRuntimeUtilities.CameraFrameToScreenSpaceCoordinates(obb, bgTextureViewPortRect, isMirrored, videoModeData)); } // update word behaviours if enabled: if (mWordPrefabCreationMode == WordPrefabCreationMode.DUPLICATE) { UpdateWordBehaviourPoses(); } }