Example #1
0
 void Awake()
 {
     _vrPlayerInstance          = this;
     _prefab                    = VRAssetManager.GetAsset <GameObject>(PLAYER_PREFAB_NAME);
     _preferredHand             = VHVRConfig.GetPreferredHand();
     headPositionInitialized    = false;
     FIRST_PERSON_OFFSET        = Vector3.zero;
     THIRD_PERSON_CONFIG_OFFSET = VHVRConfig.GetThirdPersonHeadOffset();
     ensurePlayerInstance();
     gameObject.AddComponent <VRControls>();
 }