Hi,
I have an empty game object with the following script attached:
using UnityEngine;
using System.Collections;
public class GameMaster : MonoBehaviour {
public GameObject playerCharacter;
private GameObject _pc;
private Vector3 _playerSpawnPos;
void Start () {
_playerSpawnPos = new Vector3(20.0f, 4.0f, 20.0f);
//_pc = Instantiate( playerCharacter, _playerSpawnPos, Quaternion.identity ) as GameObject;
_pc = Instantiate( playerCharacter, Vector3.zero, Quaternion.identity ) as GameObject;
_pc.name = "wtf";
_pc.transform.position = _playerSpawnPos;
}
}
I have a prefab based on the Camera Relative Controls controller. This prefab becomes my “playerCharacter” Game Object. When I transform the position the joysticks show up at (-20, -4, 0). So they aren’t showing up in the camera. The capsule and the camera transform ok, just not the joysticks. What am I missing?
Thanks for any help!!
Cheers!
Jim