public override void Deactivate() { Cameras.SetActive(false); WorldAnchor.SetActive(false); if (BackgroundTexturePreview) { BackgroundTexturePreview.StopCamera(); } base.Deactivate(); }
public override void Activate() { m_doUpdate = true; Cameras.SetActive(true); WorldAnchor.SetActive(true); if (GyroCamera) { GyroCamera.CalibrateCompass(); } if (BackgroundTexturePreview) { BackgroundTexturePreview.StartCamera(); } base.Activate(); }
protected override void Update() { var trackables = TrackerManager.Instance.GetStateManager().GetTrackableBehaviours(); m_logger.Verbose("active={0} status={1}", m_positionalDeviceTracker != null ? m_positionalDeviceTracker.IsActive.ToString() : "null", m_devicePoseStatus); /* * Dbg(TrackingState, "active={0} status={1}", * m_positionalDeviceTracker != null ? m_positionalDeviceTracker.IsActive.ToString() : "null", * m_devicePoseStatus);*/ Dbg(TrackingState, IsInSync ? "<color=green>IN SYNC</color>" : "<color=red>OUT OF SYNC</color>"); //Dbg(VuforiaCameraPosition, "vuforia cam position={0}", VuforiaWorld.Instance.ARCamera.transform.localPosition); //Dbg(VuforiaCameraRotation, "vuforia cam rotation={0}", // GetWorldHeading(VuforiaWorld.Instance.WorldAnchor.transform, // VuforiaWorld.Instance.ARCamera.transform)); Dbg(LocationCameraPosition, "world cam position={0}", WorldCamera.transform.localPosition); Dbg(LocationCameraRotation, "world cam rotation={0}", GetWorldHeading(WorldAnchor.transform, WorldCamera.transform)); if (m_anchor) { //m_logger.Debug("updating anchor pos={0}", m_anchor.transform.position); WorldAnchor.transform.position = m_anchor.transform.position; WorldAnchor.transform.rotation = m_anchor.transform.rotation; } m_adjustSwivel = !IsInSync; WorldAnchor.SetActive(IsInSync); foreach (var trackable in trackables) { //m_logger.Debug("trackable: t={0} n={1} s={2} xform={3}", trackable.GetType(), trackable.TrackableName, trackable.CurrentStatus, trackable.transform); } base.Update(); }