1 | initial version |
Take a look HERE. the variable los after line 167 contains what you're looking for.
Note that it is a unit vector proceeding from camera_translation as the origin, so you'll need to take care of that into whatever format you're using.