void Update() { for (int k = 0; k <= samples; k++) { r = GetComponent <Camera>().ScreenPointToRay(new Vector3(Random.Range(0, Screen.width), Random.Range(0, Screen.height), 0f)); if (Physics.Raycast(r, out hit, viewDistance, layerMsk.value)) { if (l = hit.transform.GetComponent <IOClod>()) { l.UnHide(hit.distance); } else if (l = hit.transform.parent.GetComponent <IOClod>()) { l.UnHide(hit.distance); } } } }
void Update() { for(int k=0; k <= samples; k++) { r = cam.ViewportPointToRay(new Vector3(hx[haltonIndex], hy[haltonIndex], 0f)); haltonIndex++; if(haltonIndex >= pixels) haltonIndex = 0; if(Physics.Raycast(r, out hit, viewDistance, layerMsk.value)) { if(l = hit.transform.GetComponent<IOClod>()) { l.UnHide(hit.distance); } else if(l = hit.transform.parent.GetComponent<IOClod>()) { l.UnHide(hit.distance); } } } }
void Update() { for (int k = 0; k <= samples; k++) { r = cam.ViewportPointToRay(new Vector3(hx[haltonIndex], hy[haltonIndex], 0f)); haltonIndex++; if (haltonIndex >= pixels) { haltonIndex = 0; } if (Physics.Raycast(r, out hit, viewDistance, layerMsk.value)) { if (l = hit.transform.GetComponent <IOClod>()) { l.UnHide(hit); } else if (l = hit.transform.parent.GetComponent <IOClod>()) { l.UnHide(hit); } } } }