Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isPlayer1)
- {
- //Instantiates the sphere && sound individually for each player.
- spawnedSphere = (GameObject)Instantiate(Resources.Load("Sphere"), new Vector3(0f, 0f, 0f), Quaternion.identity);
- sounds = (GameObject)Instantiate(Resources.Load("Sounds"), new Vector3(0f, 0f, 0f), Quaternion.identity);
- //Instantiates the camera rigs here that combines the avatar with the rig.
- spawnedCameraRig = (GameObject)Instantiate(Resources.Load("OVRCameraRig"), new Vector3(0f, 0f, 0f), Quaternion.identity);
- _playerGlobal = GameObject.Find("OVRCameraRig(Clone)").transform;
- _playerLocal = _playerGlobal.Find("OVRCameraRig(Clone)/TrackingSpace/CenterEyeAnchor");
- Debug.Log(_playerLocal);
- if (_playerLocal == null)
- {
- Debug.Log("This should work!");
- _playerLocal = _playerGlobal.Find("CenterEyeAnchor");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement