Example #1
0
 void Start()
 {
     vrRig           = transform.root.GetComponent <VRLocomotionRig>();
     leftController  = vrRig.s_handLeft.GetComponent <VRBasicController>();
     rightController = vrRig.s_handRight.GetComponent <VRBasicController>();
     agent           = vrRig.GetComponent <NavMeshAgent>();
     agent.speed     = moveSpeed;
 }
Example #2
0
        // DEVELOPER: add a string for your zone tag name! dont forget to create the tag in unity and apply it
        //private const string DevCollisionTag      = "DeveloperZone";

        #endregion

        #region Unity Methods

        void Awake()
        {
            m_locoRig = GetComponent <VRLocomotionRig>();

            source = GetComponent <AudioSource>();

            try {
                m_hbMovement = m_locoRig.s_head.GetComponent <HeadBob>();
                m_asMovement = m_locoRig.s_head.GetComponent <ArmSwing>();
                m_pMovement  = m_locoRig.s_head.GetComponent <Pulley>();
            } catch {
                Debug.LogError("there are no movement components attached to your VR rig! please ensure you did the setup correctly!");
            }
            AutoDetectCurrentMovement();
        }