I’ve got a simple script attached to my camera that instantiates a game object relative to the camera transform. Why would the instantiated game object be reporting it’s position at 0,0,0 when the inspector (and viewport) says otherwise?
void Update () {
if (Input.GetMouseButtonUp(0))
{
Instantiate(testGameObject, transform.position + transform.forward * 8, transform.rotation);
Debug.Log(testGameObject.transform.position);
}
}
localPosition has the same problem.