VRTK/SteamVR手柄震动功能

VRTK/SteamVR手柄震动功能

前言

手柄震动功能配合虚拟仿真模块的模拟电击等功能非常方便

代码块

SteamVR_Controller.DeviceRelation.Rightmost是右侧手柄

SteamVR_Controller.DeviceRelation.Leftmost是左侧手柄

csharp 复制代码
    var deviceIndex2 = SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.Rightmost);
            SteamVR_Controller.Input(deviceIndex2).TriggerHapticPulse(5000);
            var deviceIndex1 = SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.Leftmost);
            SteamVR_Controller.Input(deviceIndex1).TriggerHapticPulse(5000);
相关推荐
Nuopiane16 小时前
C#基础(1)堆栈、GC与Marshal
unity·c#
mxwin1 天前
Unity Shader 跨平台兼容性:处理纹理坐标翻转与精度差异
unity·游戏引擎
派葛穆1 天前
汇川PLC-Unity3d与汇川easy521plc进行Modbustcp通讯
unity·c#
small-pudding1 天前
Unity URP + Compute Shader 路径追踪器实战:从可用到可优化
unity·游戏引擎
weixin_423995001 天前
unity 物体转向鼠标点击方向2d和3d
unity·计算机外设·游戏引擎
mxwin1 天前
Unity URP 下 Shader 变体 (Variants):multi_compile 与 shader_feature的关键字管理及变体爆炸防控策略
unity·游戏引擎
RReality1 天前
【Unity Shader URP】全息扫描线(Hologram Scanline)源码+脚本控制
ui·unity·游戏引擎·图形渲染
渔民小镇2 天前
一次编写到处对接 —— 为 Godot/Unity/React 生成统一交互接口
java·分布式·游戏·unity·godot
RReality2 天前
【Unity Shader URP】序列帧动画(Sprite Sheet)实战教程
unity·游戏引擎
mxwin2 天前
Unity URP 多线程渲染:理解 Shader 变体对加载时间的影响
unity·游戏引擎·shader