Answers for "Unity how to cast a ray from the center of screen to world"

2

raycast from center

Transform cam = Camera.main.gameObject.transform;
Ray ray = new Ray(cam.position, cam.forward);
Posted by: Guest on May-10-2020

Code answers related to "Unity how to cast a ray from the center of screen to world"

Browse Popular Code Answers by Language