Get hit results sometimes returns invalid object

Distance from Screen controls how far from the camera the object is, which would be the same as what you are referring to as depth. If you create this variable in your blueprint, you can set the default value to be however far you’d like the object to be from the screen.