https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-capture-intro/
Slider Controls
Init on load
Linear Speed
Rotational Speed
Save/Load Button
using UnityEngine; using System.Collections; using UnityEngine.UI; using Vuforia; public class Utility_Fade_Subscriber : ArgosView { Animator animator; bool bCanvasOn = false; Vector3 v_Offset; Canvas canvas; Camera cam; void Start() { ArgosController.OnUtilityMenu_VisChange += onUtilityMenu_Vis; animator = GetComponent<Animator>(); canvas = transform.GetComponentInParent<Canvas>(); cam = DigitalEyewearBehaviour.Instance.PrimaryCamera; v_Offset = transform.position - cam.transform.position; } void onUtilityMenu_Vis(bool bOn) { animator.SetBool("isOn", bOn); bCanvasOn = bOn; } void Update() { if(bCanvasOn) { transform.position = cam.transform.position + v_Offset; } else { //transform.position = -1000f * Vector3.forward; } } }
using UnityEngine; using System.Collections; using UnityEngine.UI; using thelab.mvc; public class ArgosController : Controller<AA> { /// <summary> /// Handle notifications from the application. /// </summary> /// <param name="p_event"></param> /// <param name="p_target"></param> /// <param name="p_data"></param> private bool _mainMenu_On = false; public Text UIText; public bool mainMenu_On { get { return _mainMenu_On; } set { _mainMenu_On = value; } } public enum NavMode { NAV_1, NAV_2, NAV_3, NAV_4 }; public delegate void UtilityMenu_Vis( bool bOn); public static event UtilityMenu_Vis OnUtilityMenu_VisChange; public NavMode navMode = NavMode.NAV_1; public override void OnNotification(string p_event, Object p_target, params object[] p_data) { Log(p_event); switch (p_event) { case "scene.load": Log("Scene [" + p_data[0] + "][" + p_data[1] + "] loaded"); break; case "UI_DownScan.trigger": string selection = (string)p_data[0]; if (selection == "MENU_ONOFF") { _mainMenu_On = !mainMenu_On; Log("MENU_ONOFF " + _mainMenu_On.ToString()); OnUtilityMenu_VisChange(_mainMenu_On); } break; case "NAV1@down": Log("NOTIFICATION - NAV1@down"); navMode = NavMode.NAV_1; UIText.text = "NavMode = NAV_1"; break; case "NAV2@down": Log("NOTIFICATION - NAV2@down"); navMode = NavMode.NAV_2; UIText.text = "NavMode = NAV_2"; break; case "NAV3@down": Log("NOTIFICATION - NAV3@down"); navMode = NavMode.NAV_3; UIText.text = "NavMode = NAV_3"; break; case "NAV4@down": Log("NOTIFICATION - NAV4@down"); navMode = NavMode.NAV_4; UIText.text = "NavMode = NAV_4"; break; } } }