Some examples from VRTK were modified to work with GearVR, included here in VRTK_GearVR_Test\Examples
.
A custom "GearVR-friendly" simulator is included in a proper SDK, see Source/SDK/GearVRSimulator/README.md
for details.
Everything here works with the GearVR D-Pad only, it is designed just to enable interaction without a gamepad.
Set up libraries:
- Install OculusUtilities.unitypackage
- Delete OVR/Plugins folder
- Install VRTK version 3.3.0 (branch release/3.3.0-alpha)
Set up Build for GearVR:
- In Build settings set
Android
as platform - set
Player Settings
/Other Settings
:Color Space
=Gamma
GPU Skinning
= uncheckedVirtual Reality Supported
= checked -Virtual Reality SDKs
= addOculus
Stereo Rendering Method
=Multi Pass
Minimum API Level
=API Level 22
Set up the scene:
- load one of the provided examples
- test the example in Unity Editor (the GearVR Simulator should be automatically enabled)
In Build Settings remove all the scenes (or add only the current one)
==> Build and Run...
** Note that some examples originally could not work, because D-Pad is not mapped to touch axis (e.g. for the 015_Controller_TouchPadAxisControl
example, after the applying the changes suggested by this video [https://www.youtube.com/watch?v=ma2AetALN_k] a new example 015_Controller_TouchPadAxisControl_GearVR
was provided with a modified script RC_Car_Controller_DPad
attached to RightController
) **
Set up libraries and build settings as above.
Set up scene:
- load an example
- in the scene expand
[VRTK_SDKManager]
/SDKSetups
and delete all the attached game objects exceptOculusVR
- select
OculusVR
and in Inspector setSDK Selection
/Quick select
toGearVR (Android:Oculus)
- select
[VRTK_SDKManager]
and pressAuto Populate
in Inspector - delete
[VRTK_Scripts]
/LeftController
(or the controller you won't use) - select
[VRTK_SDKManager]
and setLeft Controller
toNone
- select
[VRTK_SDKManager]
/SDKSetups
/OculusVR
/OVRCameraRig
and setTransform
/Position
/Y
to a desired height (e.g. 1.5, 1.6, ... depending on the desired camera height) - delete
[VRTK_SDKManager]
/SDKSetups
/OculusVR
/LocalAvatar
(if you have not Oculus drivers installed) - to enable gaze-based interaction choose one of these two ways (****):
- change the existing configuration:
- add a new game object named
HeadsetFollower
to[VRTK_Scripts]
- add a
VRTK_SDKObjectAlias
script toHeadsetFollower
and setSdk Object
toHeadset
- rename the main controller (e.g.
RightController
) toHeadset
- add a
VRTK_TransformFollow
script to it and setGame Object To Follow
toHeadsetFollower
andGame Object To Change
toHeadset
- change settings in interaction scripts, e.g. interaction button set in
VRTK_InteractGrab
toTouchpad Touch
, or evenButton Two Press
for using back button press for a secondary interaction inVRTK_InteractUse
(warning: holding down the back button opens the system menu)
- add a new game object named
- replace the existing
[VRTK_Scripts]
with the provided prefab- add the prefab in
VRTK_GearVR_Test\Assets\VRTK_GearVR_Test\Prefabs\[VRTK_Scripts_GearVR]
to the scene - change pointer and interaction settings (e.g. Pointer settings in
Headset
or Policy List inPlayArea
) - remove unneeded components
- delete the original
[VRTK_Scripts]
object
- add the prefab in
- change the existing configuration:
- enable GearVR Simulator (optional):
- add to
[VRTK_SDKManager]
/SDKSetups
a new game objectGearVRSimulator
- add a
VRTK_SDKSetup
script to it and setSDK Selection
/Quick select
toGearVRSimulator (Standalone)
- add the
[GearVRSimulator_CameraRig]
prefab to theGearVRSimulator
object - select
[VRTK_SDKManager]
and pressRemove All Symbols
in Inspector - select
[VRTK_SDKManager]
and pressAuto Populate
in Inspector - select
GearVRSimulator
and pressPopulate Now
or checkAuto Populate
- add to