34 Vector3 viewport =
_camera.WorldToViewportPoint(transform.position);
36 bool inFrontOfCamera = viewport.z > 0;
38 if (inCameraFrustum && inFrontOfCamera)
41 bool objectBlockingPoint =
false;
44 directionBetween = directionBetween.normalized;
46 float distance = Vector3.Distance(
_cameraTransform.position, transform.position);
50 if(Physics.Raycast(
_cameraTransform.position, directionBetween, out hitInfo, distance + 0.05f, layer_mask)) {
51 if(hitInfo.point != transform.position) {