public override void Action(GameObject obj) { GameObject doc = Instantiate(documentPrefab); doc.transform.position = obj.transform.position; doc.transform.rotation = Quaternion.LookRotation(Camera.main.transform.forward); //doc.transform.Rotate(90, 0, 0); //doc.transform.Rotate(0, 180, 0); doc.transform.Rotate(rotateSpawnOffset); doc.GetComponent <Rigidbody>().isKinematic = true; doc.SetActive(true); Deleteable del = doc.GetComponent <Deleteable>(); if (del.deleteCollection == null) { del.deleteCollection = deleteCollection; } HandInteract hand = obj.GetComponent <HandInteract>(); if (hand) { hand.interactChild = doc.transform; //hand.originalParent = null; } HandState handState = obj.GetComponent <HandState>(); if (hand) { doc.transform.parent = hand.transform; doc.GetComponent <ObjectOutline>().outline.SetActive(false); } }
void Start() { countDrops = 5; active = false; handInteract = GetComponent <HandInteract>(); }
private void Awake() { //m_grabber = GetComponent<OVRGrabber>(); grabber = GetComponent <HandInteract>(); }
//private List<Collider> organoids = new List<Collider>(); private void Start() { handInteract = GetComponent <HandInteract>(); }