当前位置: 首页 > news >正文

【Quest开发】控制器输入映射

https://developers.meta.com/horizon/documentation/unity/unity-ovrinput/

搬一下省得每次都找不到

组合控制器的虚拟映射

单独控制器的虚拟映射

原始映射

官方提倡使用虚拟映射,下面是一个比较常见的使用方法

This can be taken a step further to allow the same code to be used for either hand by specifying the controller in a variable that is set externally, such as on a public variable in Unity Editor.
可以更进一步,通过在外部设置的变量中指定控制器(例如 Unity Editor 中的公共变量),允许将相同的代码用于任一只手。
Example Usage:  示例用法:
// public variable that can be set to LTouch or RTouch in the Unity Inspector
public Controller controller;// returns a float of the hand trigger’s current state on the controller
// specified by the controller variable.
OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller);// returns true if the primary button (“A” or “X”) is pressed on the controller
// specified by the controller variable.
OVRInput.Get(OVRInput.Button.One, controller);
This is convenient since it avoids the common pattern of if/else checks for left or right hand input mappings.
这很方便,因为它避免了对左手或右手输入映射进行 if/else 检查的常见模式

meta给的这个示例把类名省了用不了...得这样写

 public OVRInput.Controller controller;axis = OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller);

常用控件集

常用函数

http://www.dtcms.com/a/525949.html

相关文章:

  • 北京最新网站备案app软件制作教程
  • **发散创新:全面解析项目治理中的流程设计与实现**引言:随着信息技术的飞速发
  • 查询域名的网站小门户网站模板
  • 怎样用前端知识制作企业网站微信运营包括哪些内容
  • 做网站有什么用怎么为网站网页注册免费网址
  • LLCC68是SUB-1G超低功耗无线收发芯片支持150Mhz-960Mhz远距离LORA传输支持GFSK
  • 网站的风格有哪些松原做网站平台
  • 专业建站网网站运营推广企业网站色彩
  • 【Redis攻击】
  • 企业建站团队网站建设的文字用什么字体较好
  • 在 PowerShell 中安装 Chocolatey,并使用 Chocolatey 更新 Dapr
  • 用FastAPI封装Qwen云端API,本机Postman测试,再用Django做前端界面调用
  • 网站源码做exe执行程序开发公司交钥匙流程
  • gooood谷德设计网站咸宁网站开发
  • 企业电商网站备案流程苏州做网站哪家专业
  • 可信网站认证必须做井研移动网站建设
  • 网站后台登陆密码破解网站建设 推神网络
  • 免费做字体的网站好广告网站建设案例
  • 高电压技术:水分在普通气压和高气压条件下--对击穿电压的影响
  • 2021好心人给个开车的网站珠海市建设局官方网站
  • 如何更好地指挥语言大模型给自己干活
  • 如何设计通用 ATS 代理销售激励系统(从业务到架构的通盘思考)
  • 灯具公司网站模板做360手机网站快
  • 网站免费维护期是多少.net 做手机网站吗
  • 工控主机做网站服务器宁夏住房和城乡建设官方网站
  • 广州seo网站营销网站安全 维护
  • Python 类的用法
  • 零钱通项目
  • 网站如何做免费推广商业网站开发入门
  • 怎样制作表白网站如何用c语言做网站