Hey guys,
Any idea why in this lecture, we are not doing first the check if there is a click.
And only after that to do the Raycasting ?
Won’t this be better from a performance point of view ?
In the video you are doing var hits = Physics.RaycastAll(GetMouseRay()); in every Update invoke.
And only if the result have something you are doing a check if there is a click.
This will result a ton of wasted calculations and sound strange to me.
Correct me if I am wrong please.