https://learn.unity.com/course/create-with-vr
1. VR Basics
1.1 - VR Project Setup
- 6DOF: move & roate on 3 degrees;both hand & head
- 使用 Universal RP 方便进行 Mobile 平台的渲染
- XR开发套件 - 便于统一跨平台
2.Open and explore the starter scene
- 创建 XR rig 组件
- 套件中提供了
- 绑定相机
- 绑定左右控制器
- 绑定了控制器对应的 动作-按键 映射参数
- 提供了选择激光的控制预设
3.Add a room and background
4.Test with the Device Simulator
- control mapping keyshorts
5.Test in VR through Unity
6.Build and run on your device
Extension Activities
1.2 - VR Locomotion
https://learn.unity.com/tutorial/vr-locomotion?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=60183335edbc2a2e6c4c7dcb#
2.Add snap turning functionality
-
locomotion
- continuous turns & snap turns 平滑转向 & 切换转向
3.Create a Teleportation Area on a rug
-
设定传送控制
-
设定传送范围
4.Create Teleportation Anchors on mats
5.Customize the Reticles for teleportation
- 将prefab扔到teleportation area/anchor的custom reticle
课后题 - 自旋转指示做法
https://www.youtube.com/watch?v=Ylsrsy1nrCY&ab_channel=GarlicSuter
1.3 - Grabbable Objects
https://learn.unity.com/tutorial/grabbable-objects?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=60183335edbc2a2e6c4c7dcb
1.Choose hand models
- 在xr rig的左右手控制器下,可以修改model prefab
2. Add a grabbable object
3.Hide hands and disable anchor control
-
调整与物体交互时的抓握属性
- anchor control - 抓握时通过摇杆控制物体的前后移动与旋转
4.Fine-tune the throwing experience
-
create physic material
注意kinematic选项关系
- 将 collision detection 改为 continuous dynamic 以使碰撞模拟不会穿过地面
- 勾选smooth position & rotation
5.Add an object with a handle
- 在交互物品下创建一个子集空对象,作为grab属性下attach transform的依据
6.Organize the Hierarchy
附加题
1.4 - Sockets
https://learn.unity.com/tutorial/sockets-g?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=60183335edbc2a2e6c4c7dcb#
1.Add grabbable hats to the scene
2.Turn the hook into a simple socket
- 在挂帽架下添加empty【Socket】 → 为empty添加sphere collider作为范围触发检测(勾选is trigger)
- 添加 XR socket interactor
- 在empty【Socket】子集下添加empty【Attach】作为目标变换参考
3.Duplicate the sockets and attach hats by default
- starting selected interactable - 可在初始化时把物件先挂上去
4.Make your head a socket for hats
- 将 socket 添加到XR rig的camera子集下
5.Prevent other objects from acting like hats
Challenge 1 - Architecture Review
Bonus task hints:
6. Look in the XR Ray Interactor component to edit the line’s shape and the XR Interactor Line Visual component to edit its colors. 更改指示射线形状
7. Make sure your audio source is set to the 3D “Spatial Blend,” then, if you want, use the OnTimedInterval and PlaySoundsFromList components to randomize the bird sounds. 添加声音的方式
Lab 1 - VR Personal Project Basics
https://learn.unity.com/tutorial/lab-1-vr-personal-project-basics?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=60183335edbc2a2e6c4c7dcb#
VR Next Steps
https://learn.unity.com/tutorial/vr-next-steps?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae#
2 - VR Events and Interactions
2.1 - Audio and Haptics
https://learn.unity.com/tutorial/2-1-audio-and-haptics?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=601834b9edbc2a4418546660
1.Add haptic feedback on hover and select enter
- XR rig 下的手柄控制可以添加 haptic events
2.Add audio feedback on either hover or select enter
3.Add 3D audio from the fireplace
4.Add a Reverb Zone
- 在 hierarchy - room 子集下创建 audio reverb zone
- 混响属性
Experiment with spatializer plugins [optional]
附加题
2.2 - Activation Events
https://learn.unity.com/tutorial/2-2-activation-events?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=601834b9edbc2a4418546660#6023388fedbc2a0f094364fa
1.Add a grabbable remote control object
2.Play a sound when you activate the remote
3.Change the remote’s indicator light color when activated
4.Make the TV play video
5.Control the TV with the remote
附加题
2.3 - Direct and Ray Interactors
https://learn.unity.com/tutorial/2-3-direct-and-ray-interactors?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=601834b9edbc2a4418546660#
1.Add a Direct Interactor to the right controller
- 左右控制器使用 XR direct Interactor + collider,使用手的方式进行交互而非 ray
2.Add haptic and audio feedback to your Direct Interactor
3.Prevent ray from picking up objects
4.Create a Direct and Ray Interactor for each hand
5.Toggle ray with button press
- guide
- OnButtonPress.cs 处理按钮按下绑定的事件
- ToggleRay.cs 处理 ray
6.Add additional binding and repeat for other hand
附加题
2.4 - User Interface
https://learn.unity.com/tutorial/2-4-user-interface?uv=2020.3&courseId=60183276edbc2a2e6c4c7dae&projectId=601834b9edbc2a4418546660#