<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>移动系统 on XR技术研习社</title><link>https://www.xrstudy.net/tags/%E7%A7%BB%E5%8A%A8%E7%B3%BB%E7%BB%9F/</link><description>Recent content in 移动系统 on XR技术研习社</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Wed, 09 Apr 2025 18:00:00 +0800</lastBuildDate><atom:link href="https://www.xrstudy.net/tags/%E7%A7%BB%E5%8A%A8%E7%B3%BB%E7%BB%9F/index.xml" rel="self" type="application/rss+xml"/><item><title>Interaction Toolkit 跳跃功能详解</title><link>https://www.xrstudy.net/posts/xri-jump-provider/</link><pubDate>Wed, 09 Apr 2025 18:00:00 +0800</pubDate><guid>https://www.xrstudy.net/posts/xri-jump-provider/</guid><description>&lt;h2 id="本文主要内容"&gt;本文主要内容&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;介绍实现跳跃功能的 Jump Provider 组件&lt;/li&gt;&#10;&lt;li&gt;如何禁用跳跃功能&lt;/li&gt;&#10;&lt;li&gt;如何将跳跃功能绑定到其他按键上&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="跳跃功能概述"&gt;跳跃功能概述&lt;/h2&gt;&#10;&lt;p&gt;在 Interaction Toolkit 新版本中，如果使用新版本中的 XR Origin 预制体进行场景初始化，跳跃功能会默认集成在预制体中，开发者无需手动实现，程序运行时，通过点击右手手柄控制器的 A 键即可实现跳跃。&lt;/p&gt;&#10;&lt;h2 id="跳跃功能的实现结构"&gt;跳跃功能的实现结构&lt;/h2&gt;&#10;&lt;p&gt;要了解 Interaction Toolkit 中跳跃功能的实现，首先需要了解相关游戏对象的结构。&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://www.xrstudy.net/images/posts/xri-jump-provider/01-xr-origin-locomotion-hierarchy.png" alt="XR Origin 下的 Locomotion 节点，Turn、Move、Grab Move、Teleportation、Climb、Gravity、Jump 都是它的子物体"&gt;&lt;/p&gt;&#10;&lt;p&gt;在游戏对象 XR Origin 下的 Locomotion 中，包含了一个名为 Jump 的子物体，在其上挂载了一个名为 Jump Provider 的组件，这是实现跳跃功能的主要组件。值得注意的是，跳跃功能并不仅凭 Jump Provider 实现，在 Interaction Toolkit 的移动架构中，各种移动形式不仅需要各自的 Provider，还需要一个全局管理角色 Locomotion Mediator 来管理协调不同的移动方式。&lt;/p&gt;&#10;&lt;h2 id="如何禁用跳跃功能"&gt;如何禁用跳跃功能&lt;/h2&gt;&#10;&lt;p&gt;并非所有 VR 项目都需要跳跃功能，而默认情况下跳跃功能占用了右手控制器的 A 键。如果项目不需要跳跃或者需要在 A 键上实现其他功能，此时在 Hierarchy 窗口中将 Jump 子物体隐藏即可禁用跳跃功能。&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://www.xrstudy.net/images/posts/xri-jump-provider/02-jump-gameobject.png" alt="Hierarchy 中的 Jump 子物体，Inspector 里可以看到它挂的是 Jump Provider 组件"&gt;&lt;/p&gt;</description></item></channel></rss>