// Use this for initialization void Start() { //Canvas element that displays the object type gvrObject = GameObject.Find("GvrObject"); objectText = gvrObject.GetComponent <Text>(); anim = gvrObject.GetComponent <Animator>(); //Movement script for the VR head astro_script = GameObject.FindGameObjectWithTag("Player").GetComponent <AstronautScript>(); audio_script = GameObject.Find("Main Camera").GetComponent <AudioScript>(); objType = gameObject.name; //Contextual Menu Object contextMenu = GameObject.Find("Contextual Menu"); }
void DropAstronaut(AstronautScript astronaut) { var startLocation = Camera.main.ViewportToWorldPoint(new Vector3(Random.value, 1.1f, Camera.main.nearClipPlane)); Instantiate(astronaut, startLocation, Quaternion.identity); }