WaveVR Plugin 3.x.x概述

作者:追风剑情 发布于:2019-3-26 16:58 分类:Unity3d

HTC Vive Focus(HTC的VR一体机)

111.png

VIVE Wave SDK下载
https://developer.vive.com/resources/knowledgebase/wave-sdk/

Wave Unity SDK文档
https://hub.vive.com/zh-CN/profile/documents

Import Package到Unity工程
111.png


1.png

VIVE Focus向电脑投屏
https://www.vive.com/cn/forum/3497?1
点击电脑下方的这个图标(笔机本win10)
111.png
再点
222.png
选择
333.png

类职责说明
WaveVR_Init
负责监听所有WVR_EventType事件

WaveVR_ControllerLoader
负责加载控制器模型

WaveVR_PoseTrackerManager
负责管理WaveVR_DevicePoseTracker、WaveVR_ControllerPoseTracker

WaveVR_DevicePoseTracker
头显姿态追踪器

WaveVR_ControllerPoseTracker
控制器姿态追踪器

WaveVR_Beam
负责生成控制器的射线

WaveVR_ControllerPointer
负责生成控制器射线的端点

UniversalControllerActions
负责处理控制器显示状态

WaveVR_Camera
处理Camera的OnPreRender()、OnRenderObject()事件回调

WaveVR_Distortion
当运行在UNITY_EDITOR时,负责控制画面渲染。

监听控制器按键

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using wvr;

/// <summary>
/// 监听用户的控制器操作
/// </summary>
public class UserControllerListener : MonoBehaviour {

    public WVR_DeviceType deviceType = WVR_DeviceType.WVR_DeviceType_Controller_Right;

    private void Awake()
    {
        WaveVR_ControllerListener.Device device = WaveVR_ControllerListener.Instance.Input(deviceType);
        device.PressUpListenersMenu += OnPressUpListenersMenu;
    }

    private void OnPressUpListenersMenu()
    {
        //TODO:: 处理菜单按键事件
    }
}

支持的按键事件
public delegate void ButtonEventHandler();
// Listeners of press
public event ButtonEventHandler PressDownListenersMenu;
public event ButtonEventHandler PressDownListenersGrip;
public event ButtonEventHandler PressDownListenersTouchpad;
public event ButtonEventHandler PressDownListenersTrigger;
public event ButtonEventHandler PressUpListenersMenu;
public event ButtonEventHandler PressUpListenersGrip;
public event ButtonEventHandler PressUpListenersTouchpad;
public event ButtonEventHandler PressUpListenersTrigger;
// Listeners of touch
public event ButtonEventHandler TouchDownListenersTouchpad;
public event ButtonEventHandler TouchDownListenersTrigger;
public event ButtonEventHandler TouchUpListenersTouchpad;
public event ButtonEventHandler TouchUpListenersTrigger;

标签: WaveVR

Powered by emlog  蜀ICP备18021003号   sitemap

川公网安备 51019002001593号