1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Room scale VR workshop unite singapore 2017 kho tài liệu bách khoa

22 47 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 22
Dung lượng 2,04 MB

Nội dung

Laser Cop VR Training Day Jay Santos, Unity Technologies Demo About Me Assets https://www.assetstore.unity3d.com/en/#!/list/46441-laser-cop-assets Learning Cycles The Project Audio Enabling VR Spawning Many Enemies Graphics and Pooling 10 Switching Hands Ranged Drones 11 Pausing and UI Interaction The Player Sword 12 Player Health Melee Drones Improving Physics 1) The Project • Open the Main scene • Drag Ground and Buildings prefab into Hierarchy window • Drag the Skybox material into the Scene window • Drag the VRLog prefab into the Hierarchy window • Drag the CameraEditorControl script onto the PlayerRig game object 2) Enabling VR • Add the PlayerTrackingAdjust script to the PlayerRig • Add the VRObjectTracking script to the Left and Right Hands under the PlayerRig • For each hand, set the correct VR Node type • Enble VR by clicking VR->Enabe VR at the top or by going to Edit->Project Settings->Player->Other Settings->Virtual Reality Supported • Drag the BodyToHeadTracking script to the PlayerBody object under the PlayerRig 3) Graphics and Pooling • Add the Object Pool Manager script to the Object Pools game object • Set the size of the Pools property to • Add the Bullet, Impact, Explosion, and MeleeCut prefabs to the Object Pool Manager and set the size for each to 10 • Add a Post Processing Behavior component to the HMD object • Locate the Main profile, in the Post Processing folder, and add it to the Profile property of the Post Processing Behavior on the HMD • Feel free to play around with post processing configurations! 4) Ranged Drones • Locate the Navigation Arc object under the Environment Object and Bake its Navmesh • Disable the Mesh Collider on the Navigation Arc • Drag a Ranged Drone from the Prefab folder into the Scene • Add a NavmeshAgent Component to the Ranged Drone • Add a RangedDrone script to the Ranged Drone • Apply the changes to the Ranged Drone game object 5) The Player Sword • Under each Hand game object, delete the Temporary game objects • Drag the LaserSword prefab onto each Hand game object • Add the Sword script to the LaserSword game object • Add the Tip game object to the Sword Tip property of the Sword script • Apply the changes to the LaserSword prefab to apply then to the other hand 6) Melee Drones • Drag the MeleeDrone prefab into the Scene window • Add the MeleeDrone script to the MeleeDrone game object • Change the Max Target Height to 1.8 • Apply changes to MeleeDrone • Drag the AttachableSlicer prefab onto the LaserSword game object • Apply the changes to the LaserSword prefab • Change the code from MeleeDrone starting from line 43 to 7) Physics Settings • Open the Time settings (Edit->Project Settings->Time) and set the Fixed Timestep to 0125 • Open the Physics settings (Edit->Project Settings>Physics) and set the Gravity to -1 on the Y axis • Adjust the Collision Matrix 8) Audio • Add SwordAudio script to the LaserSword • Set the clip of the Audio Source to Whoosh Wav • Apply changes to LaserSword prefab • Add an Audio Source to the Game Manager object and assign a clip to it • Set Play on Awake and Loop to true and Volume to • Go to Audio setting (Edit->Project Settings->Audio) and set the Spacializer Plugin to the Oculus Spacializer • Set the Spatialize property on the follow Audio Sources: Laser Sword, Ranged and Melee Drone, Bullet, Explosion, and MeleeCut 9) Spawning Many Enemies • Delete the Ranged Drone and Melee Drone from the scene • Add the GM_SpawnModule script to the Game Manager game object • Drag the Enemy Wave objects onto the Waves property • Drag the Ranged Drone prefab on the Ranged Enemy property • Drag the Ranged Drone Spawn Points onto the Ranged Spawn Points property • Drag the Melee Drone prefab onto the Melee Enemy property • Drag the Melee Drone Spawn Points onto the Melee Spawn Points property 10) Switching Hands • Drag Controller prefabs onto each Hand game object • Add a RaycastInput script to the Controller game object • On the VRLineRenderer, set the Start Width to and End Width to • Apply the changes to the Controller prefab • Add the GM_HandModule script to the Game Manager • Add Swords and Controllers to the GM_HandModule component • Set the Starting Mode to Controllers 11) Pausing and UI Interaction • Drag the Pause Manager prefab into the Hierarchy window • Locate the OK Button in the Pause Manager and add a Box Collider component • Adjust the size of the Box Collider to (500, 150, 1) • Apply the prefab changes to the Pause Manager 12) Player Health • Add the GM_PostEffectModule script to the Game Manager game object • Add the Main and Damaged post effects profile to the Default Profile and Damaged Profile properties • Add the hurt sounds to the Sounds list • Add Player Health script to Player Body game object (under PlayerRig) • Add an OnDamaged event and set it to call the PlayDamageEffect method of the GM_PostProcessModule script • Add an OnKilled event and set it to call the Stop method of the GM_EnemySpawn module script • Add an OnKilled event and set it to call the TogglePause method of the Pause Manager script Make sure to check the checkbox! Thank you! Jay Santos Lead Evangelist – SAPAC jay@unity3d.com ... Left and Right Hands under the PlayerRig • For each hand, set the correct VR Node type • Enble VR by clicking VR- >Enabe VR at the top or by going to Edit->Project Settings->Player->Other Settings->Virtual... the VRLog prefab into the Hierarchy window • Drag the CameraEditorControl script onto the PlayerRig game object 2) Enabling VR • Add the PlayerTrackingAdjust script to the PlayerRig • Add the VRObjectTracking...Laser Cop VR Training Day Jay Santos, Unity Technologies Demo About Me Assets https://www.assetstore.unity3d.com/en/#!/list/46441-laser-cop-assets Learning Cycles The Project Audio Enabling VR Spawning

Ngày đăng: 08/11/2019, 17:52