Ben, Ben, Ben… you dirty little rapscallion!
When we’re learning to deproject, you tell me that the deprojection returns the camera position, just throw it away, we justwant the unit vector. So i go along my merry way thinking “Oh, we won’t need that!”
Well then we perform the line trace…And come to find out, I need that camera position!!!
Seriously though Ben, I did figure out before watching your solution that I needed the camera position. However, unlike your PlayerCameraManager() approach, I set up a second out parameter from my deprojection method, so that I get both the camera position and unit vector in tha same call… So my question, is there a reason NOT to do this (i.e. speed, efficiency, what-have-you) or is it just your personal preference on avoiding out parameters?
was going to share my solution, but the “formatted text” option seems to be having trouble with that…