Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Input.GetKeyDown(KeyCode.Mouse1))
- {
- for (int n = 0; n < 8; n++)
- {
- // X axis raycast
- RaycastHit[] hits;
- hits = Physics.RaycastAll(floorsX[n].transform.position, Vector3.up, 9);
- for (int m = 0; m < 8; m++)
- {
- floorListX[n, m] = hits[m].collider.gameObject;
- print(hits[m].collider.gameObject.GetComponent<controllCube>().colourFacing);
- }
- // Y axis raycast
- RaycastHit[] hits2;
- hits2 = Physics.RaycastAll(floorsY[n].transform.position, Vector3.right, 9);
- for (int m = 0; m < 8; m++)
- {
- floorListY[n, m] = hits2[m].collider.gameObject;
- }
- }
- }
Add Comment
Please, Sign In to add comment