Android XR SDK 现已推出开发者预览版。我们期望收到您的反馈!请访问我们的
支持页面与我们联系。
动作
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
动作可以将您的 XR 应用从静态场景转变为富有活力的互动体验。在使用动画进行设计时,请务必考虑用户的视觉和身体舒适度。
- 界面动效:对于界面元素,您可以遵循既定的界面动效设计标准,例如 Material Design 的动效准则。
- XR 应用中的 3D 动作:在构建包含 3D 对象和环境互动的应用时,请注意大动作可能会让用户感到不舒服。移动可让用户在虚拟世界中保持沉浸状态的界面或环境时,请务必谨慎小心。如果移动速度过快,用户可能会感到身体不适或晕动。
- 以舒适为目标进行设计:避免让用户感到不适的动作。
- 从小处着手:使用细微的动作来鼓励用户探索您的应用。将大动作留到特定时刻。
- 提供指导:使用动画来帮助用户了解正在发生的情况以及将目光投向何处。
如何添加人性化的动作
考虑应用中的任何动作给用户带来的感受。当用户掌控聊天室中的动作时,他们会感到更舒适。
如果应用在用户意料之外决定移动界面中的某个内容,可能会给用户带来不适。如果您的眼睛感知到虚拟世界中的移动,而内耳检测到您保持静止,这种感官不一致可能会引发晕动。
请遵循以下最佳实践,让用户感到安全和舒适。
- 清晰的新手入门:为帮助用户熟悉您的应用,请逐步引入动作机制。
- 休息点:静止或减少动作的一刻,让用户可以休息并避免疲劳。
- 考虑将动画效果设为可选:有些用户可能更喜欢能够调整动画效果级别。
- 可预测的相机运动:平滑且可预测的相机运动有助于防止不适。
- 考虑使用动画反馈:如果您想打造逼真的体验,可以使用遵循现实世界物理定律的动画。
- 全局性运动可能会让人感到不适。在需要进行大幅移动的情况下,您可能需要进行淡出和淡入、隐藏用户的视野边缘、缓慢加速或避免旋转。
- 限制大型对象的移动,因为这可能会让用户感觉自己也在移动。为避免用户感到不适,不妨考虑将这些对象设为半透明或不太引人注意。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Motion can transform your XR app from a static scene into a vibrant, interactive\nexperience. It's important to consider a user's visual and physical comfort when\ndesigning with motion.\n\n- **UI motion** : For user interface elements, you can follow established UI motion design standards, such as [Material Design's motion guidelines](https://m3.material.io/styles/motion/overview).\n- **3D motion in XR apps**: When building an app with 3D objects and environment interactions, keep in mind large movements may be uncomfortable to users. Be thoughtful when moving UI or environments that ground a user in your virtual world. If moved too quickly, a user may experience physical discomfort or motion sickness.\n- **Design for comfort**: Avoid motion that makes people feel sick.\n- **Start small**: Use subtle movements to encourage users to explore your app. Save big movements for specific moments.\n- **Provide guidance**: Use motion to help users understand what's happening and where to look.\n\n### How to add user-friendly motion\n\nConsider how any movements in your app make a user feel. Motion in space is more\ncomfortable to users when they are in control.\n\nDiscomfort can happen when an app decides to move something in space without a\nuser expecting it. If your eyes perceive movement in the virtual world while\nyour inner ear detects that you're still, this sensory mismatch can trigger\nmotion sickness.\n\nFollow these best practices to keep users feeling safe and comfortable.\n\n- **Clear onboarding**: To help users acclimate to your app, introduce motion mechanics gradually.\n- **Rest stops**: Moments of stillness or reduced motion allow users to rest and avoid fatigue.\n- **Consider making motion optional**: Some users may be more comfortable when they can adjust the level of motion.\n- **Predictable camera motions**: Smooth and predictable camera movements can help prevent discomfort.\n- **Consider animated feedback**: If you want to create a believable experience, you can use animations that follow real-world physics.\n- **Whole world movements can make people feel sick**. In cases where big movements are necessary, you may want to fade out and fade in, hide a user's peripheral vision, accelerate slowly, or avoid rotating.\n- **Limit motion of large objects**, because it can feel like the user is moving as well. To prevent users from experiencing discomfort, consider making these objects semi-transparent or less noticeable."]]