physics raycast not working? is this setup right?

hello friends.

is this NOT right?

I finally got this sorta working, but 2 things are wrong:

  1. the debug ray only shows about 2 feet out from player camera. not the full length. (and draw line, which is apparently much longer, only goes from camera to world origin no matter WHAT I do.)

  2. the returned ray distance, only shows anything other than 0 if it hits SOME objects, and those objects dont even have a collider half the time. but other objects for sure with colliders dont register at all. and no matter what layer mask i use or dont use.

anything look off to you guys?

thanks for reading.

(btw im trying to dynamically adjust the cinemachine/physical camera’s depth of field post effect… which may not even be the right way at all. i admit.)

I know this is old but the issue is that the Raycast has either hot or not so you need an if, true or false logic to flow from true to the set focal length node.