How do you make a ray that starts at the camera and from the centre of the screen?
Camera camera = GetComponent();Vector3 point = new Vector3(camera.pixelWidth/2, camera.pixelHeight/2, 0);camera.ScreenPointToRay(point);
How do you raycast with a given RaycastHit hit and Raycast Ray and print the location to the log?
if (Physics.Raycast(ray, out hit)) { Debug.Log(hit.point)}
How do you check if the left mouse button is clicked?
Input.GetMouseButtonDown(0)Returns boolean.
What are rays and what is raycasting?
Rays are invisible lines that start at some origin and extends in a specific direction.Raycasting finds out what intersects that ray.