当前位置:网站首页>MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现
MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现
2022-08-05 03:08:00 【Leoysq】
官方教程:练习 - 向对象添加手部交互脚本 - Learn | Microsoft Docs
使用工具MixedRealityFeatureTool-1.0.2206.1-Preview布局好Unity环境以后就开始开发了。
案例效果:
该案例实现拖拽物体和旋转物体



1.创建一个空场景,使用工具导入配置

2.任意创建一个被拖拽的物体模型

3.为其添加微软HoloLens插件MRTK 2的脚本


4.完成案例
接下来讲解单手精准缩放
添加脚本BoundsControl 给被操作的游戏物体

修改缩放角点样式

修改棱边样式


Bounds control - MRTK 2 | Microsoft Docs官方样式修改API
模拟手控输入:
- 要启用模拟右手,按住空格键。 要移除该手,松开空格键。
- 要启用模拟左手,按住左 Shift 键。 要移除该手,松开该键。
- 要在场景中移动左手或右手,移动鼠标。
- 要向前或向后移动手,滚动鼠标滚轮。
- 要模拟收缩手势,单击鼠标左键。
- 要旋转手,按住空格键 + CTRL 键(右手)或按住左 Shift 键 + CTRL 键(左手),然后移动鼠标
- 按Y固定右手,按T固定左手
良心教程
边栏推荐
- 627. Change of gender
- 1667. 修复表中的名字
- 1484. Sell Products by Date
- 链表的简单描述及代码的简单实现
- 1527. 患某种疾病的患者
- How OpenGL works
- 优炫数据库的单节点如何转集群
- Linux下常见的开源数据库,你知道几个?
- 【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can
- Ant Sword Advanced Module Development
猜你喜欢

人人都在说的数据中台,你需要关注的核心特点是什么?

Bubble Sort and Quick Sort

【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can

2022-08-04 第六小组 瞒春 学习笔记

After the large pixel panorama is completed, what are the promotion methods?

Is your data safe in this hyperconnected world?

word column notes

【七夕节】浪漫七夕,代码传情。将爱意变成绚烂的立体场景,给她(他)一个惊喜!(送代码)

ASP.NET application--Hello World

Matlab drawing 3
随机推荐
mysql can't Execute, please solve it
为什么pca分量没有关联
Details such as compiling pretreatment
Cloud Native (32) | Introduction to Platform Storage System in Kubernetes
OpenGL 工作原理
数据增强Mixup原理与代码解读
1484. Sell Products by Date
torch.roll()
High Item 02 Information System Project Management Fundamentals
论治理与创新,2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满落幕
22-07-31周总结
2022了你还不会『低代码』?数据科学也能玩转Low-Code啦!
Distributed systems revisited: there will never be a perfect consistency scheme...
Use @Mapper to query the partition status of oracle and report an error
[Filter tracking] based on matlab unscented Kalman filter inertial navigation + DVL combined navigation [including Matlab source code 2019]
冒泡排序与快速排序
1873. 计算特殊奖金
The problem of lack of dynamic library "libtinfo.so.5" in ksql application under UOS system
1667. 修复表中的名字
ASP.NET应用程序--Hello World