private void InteractAtPoint() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit, Mathf.Infinity, terrainMask)) { if (ValidLocation(hit)) { GameObject go = Instantiate(active.getPrefab(), hit.point + active.getOffset(), spawnable.getRotation()); go.transform.localScale = Vector3.one * spawnable.getSize(); go.transform.parent = parentObject.transform; } } }