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

Pointing my camera to my instantiated player

$
0
0
Hi Guys,

I have a camera thats following my player. It was working when my prefab was in the scene. Now its being instantiated by my game manager.

I just cannot work out how to reference it.
My player is coming up once instantiated as Player(Clone)
but nothing i put in start (Where the ????????'s are in my line of code) seems to work.

Here is the code:

Code (CSharp):
  1. public class CameraFollow : MonoBehaviour
  2. {
  3.     public float cameraDistOffset = 10;
  4.     private Camera mainCamera;...
Pointing my camera to my instantiated player

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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