// OVRInput.Update();
if (OVRInput.GetUp(OVRInput.Button.Three))
{
Debug.Log("remote click");
text.text = "X";
}
if (OVRInput.GetUp(OVRInput.Button.Four))
{
Debug.Log("remote click");
text.text = "Y";
}
if (OVRInput.Get(OVRInput.Button.One,OVRInput.Controller.RTouch))
{
Debug.Log("攻击键A");
text.text = "Attack A";
}
if (OVRInput.Get(OVRInput.Button.Two, OVRInput.Controller.RTouch))
{
Debug.Log("攻击键B");
text.text = "ATTack B";
}

//if (OVRInput.Get(OVRInput.RawButton.LThumbstickUp))
//{
// Debug.Log("左侧遥感");
// text.text = "LeftSide";
//}
//if (OVRInput.Get(OVRInput.RawButton.LThumbstickDown))
//{
// Debug.Log("左侧遥感");
// text.text = "LeftSide";
//}
////右侧遥感上下左右
//if (OVRInput.Get(OVRInput.RawButton.RThumbstickUp))
//{
// Debug.Log("右侧遥感");
// text.text = "RThumbstickUp";
//}
//if (OVRInput.Get(OVRInput.RawButton.RThumbstickDown))
//{
// Debug.Log("右侧遥感");
// text.text = "RThumbstickDown";
//}
//if (OVRInput.Get(OVRInput.RawButton.RThumbstickRight))
//{
// Debug.Log("右侧遥感");
// text.text = "RThumbstickRight";
//}
//if (OVRInput.Get(OVRInput.RawButton.RThumbstickLeft))
//{
// Debug.Log("右侧遥感");
// text.text = "RThumbstickLeft";
//}



vt =OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick);
if (vt.x != 0 && vt.y != 0)
{
text.text = vt.x + " " + vt.y;
}
vt = OVRInput.Get(OVRInput.Axis2D.SecondaryThumbstick);
if (vt.x != 0 && vt.y != 0)
{
text.text = vt.x + " " + vt.y;
}
//射击
float aa=OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger);
if (aa!= 0)
{
text.text = aa+ " A1";
}
aa = OVRInput.Get(OVRInput.Axis1D.SecondaryIndexTrigger);
if (aa != 0)
{
text.text = aa + " A2";
}
//握柄按钮
float aaa=OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger);
if (aaa != 0)
{
text.text = aaa + " AAAA1";
}
aaa = OVRInput.Get(OVRInput.Axis1D.SecondaryHandTrigger);
if (aaa != 0)
{
text.text = aaa + " AAAA2";
}

//遥感按键
if (OVRInput.Get(OVRInput.Button.PrimaryThumbstick))
{
text.text = "1";
Debug.Log("1");
}
if (OVRInput.Get(OVRInput.Button.SecondaryThumbstick))
{
text.text = "2";
Debug.Log("2");
}
//触摸按钮
if (OVRInput.Get(OVRInput.Touch.PrimaryThumbRest))
{
text.text = "3";
Debug.Log("3");
}
if (OVRInput.Get(OVRInput.Touch.SecondaryThumbRest))
{
text.text = "4";
Debug.Log("4");
}

最新文章

  1. [Leetcode] Course Schedule
  2. EasyUI创建异步树形菜单和动态添加标签页tab
  3. Angular系列----AngularJS入门教程02:静态模板(转载)
  4. [转+原]chrony
  5. Linux下怎么运行java程序
  6. 14、SQL基础整理(存储过程)
  7. 利用Javascript获取当前日期的农历日期
  8. makefile 进阶
  9. Object-C 对象 (创建/销毁 对象)-- 笔记
  10. 手游架构-REST架构
  11. 让EFCore更疯狂些的扩展类库(二):查询缓存、分部sql、表名替换的策略配置
  12. 用smarty来做简易留言系统,明细步骤简单操作
  13. 前端面试题:css相关面试题
  14. __x__(13)0906第三天__xhtml 的语法规范
  15. June 6. 2018 Week 23rd Wednesday
  16. Centos下普通用户设置sudo权限
  17. IMEI
  18. Data URI scheme - 数据的uri模式
  19. ubuntu下安装android sdk运行模拟器出现错误:
  20. 管理多tomcat实例的shell脚本

热门文章

  1. typora文件中不显示公式
  2. Jmeter学习:Jmeter函数助手
  3. java常用开发学习网站列表
  4. @Configuration 配置类打断点后,一启动项目读取到该配置类的话就会进断点
  5. Visio中的图无失真导入LaTeX中
  6. php textarea根据回车转换成数组
  7. Vue 双向绑定
  8. repmgr部署和测试
  9. Qt多线程编程之QThreadPool 和 QRunnable使用
  10. Spring MVC文件上传下载