示例#1
0
        protected virtual void CreateControllers()
        {
            // コントローラマネージャの生成
            VRLog.Info("SteamVR Controller Manager Create");
            _ControllerManager         = gameObject.AddComponent <SteamVR_ControllerManager>();
            _ControllerManager.enabled = false;
            // コントローラの生成.
            VRLog.Info("Left Controller Create");
            Left = LeftController.Create();
            VRLog.Info("Right Controller Create");
            Right = RightController.Create();


            _ControllerManager.left  = Left.gameObject;
            _ControllerManager.right = Right.gameObject;
            _ControllerManager.UpdateTargets();
            _ControllerManager.enabled = true;

            Left.transform.SetParent(VR.Camera.Origin, true);
            Right.transform.SetParent(VR.Camera.Origin, true);

            return;
        }
示例#2
0
 protected virtual Controller CreateLeftController()
 {
     return(LeftController.Create());
 }