devwiki:vr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
devwiki:vr [2022/06/23 12:59] – [Start VR in Unity] yingdevwiki:vr [2022/06/29 17:24] – [VR Framework setup] ying
Line 208: Line 208:
   * wasd key + shift/space to turn   * wasd key + shift/space to turn
   * g  + shift/space to select   * g  + shift/space to select
 +
 +====== VR Framework setup ======
 +
 +  * import vr framework
 +  * android ATSC
 +  * uncheck all scene
 +  * install oculus XR plugin : 1.12.1
 +  * install vrTunnelingPro
 +  * Project setting: XR plugin management
 +    * check "Oculus" on for both pc and android
 +  * ~~~~~
 +  * setup
 +  * drag XR rig (BNG/Prefabs/Player) to scene (1 in Y)
 +  * create floor (convex)
 +  * delete default camera
 +  * on XR Rig/PlayerController/CameraRig/TrackingSpace/CenterEyeAnchor > add component: Tunnelling Mobile
 +    * drag PlayerController to Motion Target
 +    * motion detection: change to Linear Velocity (0, 1.5)
 +    * replace edited motion stuffs script in (BNG Framework/Script/Core)
 +    * modify PlayerControl componets
 +      * Locomotion manager: default locomotion both; uncheck from preference; none for toggle action
 +      * player teleport: control type : x button
 +      * player teleport: initiate teleport action: none
 +      * player teleport: uncheck for allow teleport rotation
 +      * smooth locomotion: speed 2: sprint speed: 4; strafe speed: 2; strafe sprint speed: 4; sprint input: left thumbstick; jump input: A button;
 +      * player teleport: tunneling -> CenterEyeAnchor; smooth locomotion -> PlayerController
 +      * player rotation: fader -> CenterEyeAnchor
 +    * modify CenterEyeAnchor:
 +      * Screen Fader:  change fade in/out speed to adjust screen fade    
 +      
 +**Make Object Grabbale**
 +  * object + rigidbody + Grabbale script + grabbale layer (so no push with your body)
 +    * grab button: use Grabber button
 +    * grab mechanic: (precise = grab offset; snap = in pivot position)
 +    * grab physics: (none=cant grab; physicivelocity=ok; kinematic=laggy)
 +    * remote grab: aimming with auto grab (linear, velocity, flick == how it fly to you)
 +    * hand options (hide hand, parent to hand = fast calculation; snap hand = hand pose)
 +    * can be dropped / snap to snap zone / force disable kinematic on drop
 +    * break distance= release on hand drag gap when fighting with physics
 +    * hand pose=grab pose
 +    * secondary grab behavior (change hands or holds both hands)
 +    * grab point (a transform like cup handle for grab point; require: snap hand model + grab snap)
 +      * create null object + Grab Point script
 +  * extra sound = Grabbable Haptics script + audio source +  Collision sound script  
 +  * (How it works: under 
 +  * XR Rig/PlayerController/CameraRig/TrackingSpace/RightHandAnchor/RightControllerAnchor/RightController/Grabber;
 +**Make Object highlight**
 +  * replace BNG Framework/scripts/component, GrabbableHighlight.cs + OutlineEffect folder add
 +  * outline effect component into CenterEyeAnchor
 +  * object + GrabbableHighlight
 +others:
 +  * + grabbable highligh material script 
 +  * + rigt helper
  
 ====== VR quick workflow ====== ====== VR quick workflow ======
  • devwiki/vr.txt
  • Last modified: 2022/07/02 03:57
  • by ying