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);
相关推荐
阿松爱学习14 小时前
【Unity开发】FileStream 详解及用法指南
unity·c#·unity开发
想做后端的前端14 小时前
Unity-UIGI优化Rebatch与Rebuild
unity
玖玥拾1 天前
Unity Shader 基础与图形学(一)
unity·图形渲染·图形学·shader
百里香酚兰1 天前
【Unity学习笔记】如何把粉色Prefab还原
笔记·学习·unity
xcLeigh2 天前
Unity基础:使用Transform控制物体旋转——Rotate与LookAt详解
unity·教程·transform·rotate·lookat
平行云2 天前
3D应用推流太贵太慢?ImmerShare Lite:利用本地算力实现极简一键分享
unity·ue5·实时云渲染·云桌面·像素流·云游戏·串流
淡海水2 天前
11-04-Unity-Span-foreach-LINQ的分配与热路径边界
unity·c#·linq·foreach·span
灸木2 天前
Unity 多线程与并发:什么时候该用多线程?
unity
淡海水3 天前
11-02-Unity-Mono-vs-IL2CPP-两种脚本后端的数据结构行为差异
数据结构·unity·游戏引擎·il2cpp·mono
彧azz3 天前
初学Unity:编辑器
笔记·学习·unity·游戏引擎