Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. if (isPlayer1)
  2. {
  3. //Instantiates the sphere && sound individually for each player.
  4. spawnedSphere = (GameObject)Instantiate(Resources.Load("Sphere"), new Vector3(0f, 0f, 0f), Quaternion.identity);
  5. sounds = (GameObject)Instantiate(Resources.Load("Sounds"), new Vector3(0f, 0f, 0f), Quaternion.identity);
  6. //Instantiates the camera rigs here that combines the avatar with the rig.
  7. spawnedCameraRig = (GameObject)Instantiate(Resources.Load("OVRCameraRig"), new Vector3(0f, 0f, 0f), Quaternion.identity);
  8. _playerGlobal = GameObject.Find("OVRCameraRig(Clone)").transform;
  9. _playerLocal = _playerGlobal.Find("OVRCameraRig(Clone)/TrackingSpace/CenterEyeAnchor");
  10. Debug.Log(_playerLocal);
  11. if (_playerLocal == null)
  12. {
  13. Debug.Log("This should work!");
  14. _playerLocal = _playerGlobal.Find("CenterEyeAnchor");
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement