zoukankan      html  css  js  c++  java
  • oculus按键大全

    // 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");
    }

  • 相关阅读:
    博客园美化(三)
    博客园美化(二)
    python异常处理
    博客园美化(一)
    STD二手图书交流平台团队博客-用户画像
    STD二手图书交流平台团队博客-电梯演讲
    学习如何运用GitHub网站+出现的问题+Git基本操作总结
    人月神话阅读笔记(二)
    人月神话阅读笔记(一)
    Android studio Handler消息处理1
  • 原文地址:https://www.cnblogs.com/heteng/p/13258763.html
Copyright © 2011-2022 走看看