Hi,
I have a first person controller on my scene named “Player”. In my script I am trying to get the position of the player in Vector3. How exactly do I do this?
This is what I tried:
var playerObject = GameObject.Find("Player");
var playerPos:Vector3 = playerObject;
Debug.Log(playerPos);
This will give me an error: Cannot convert ‘UnityEngine.GameObject’ to ‘UnityEngine.Vector3’.