Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Setting camera script target to a photon network game object

$
0
0
I'm trying to get my camera smooth follow to follow on a gameobject thats created for that player when he connects.

In my NetworkManager I have:
Code (CSharp):
  1.  
  2. gameObject.Find("Main Camera").GetComponent("SmoothFollow").Target = myPlayerGO;
Where

Code (CSharp):
  1. GameObject myPlayerGO = (GameObject)PhotonNetwork.Instantiate("PlayerModel", mySpawnSpot.transform.position, mySpawnSpot.transform.rotation, 0);
I have "Main Camera" in the scene, and a smooth follow script attached. I...

Setting camera script target to a photon network game object

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>