title: show masking on object which is between camera and wall using RealityKit
body: <p>I made a video for generating a floor plan in which I need to capture the wall and floor together at a certain position if a user is too near to the wall or if any object come between the camera and wall/floor then need to show <strong>Too Close</strong> mask on that object something like display in <a href="https://drive.google.com/file/d/1lSN4FdEtjIT89hnb5ORcKsOntcZYPBAL/view?usp=sharing" rel="nofollow noreferrer">this video</a>.</p>
  <p>I try to use rycast in <code>session(_ session: ARSession, didUpdate frame: ARFrame)</code> method but I am very new in AR and not know which method we need to use.</p>
  <pre><code>func session(_ session: ARSession, didUpdate frame: ARFrame) {
          
              
          guard let query = self.arView?.makeRaycastQuery(from: self.arView?.center ?? CGPoint.zero,
                                                    allowing: .estimatedPlane,
                                                    alignment: .any)
          else { return }
          
          guard let raycastResult = self.arView?.session.raycast(query).first
          else { return }
          
          let currentPositionOfCamera = raycastResult.worldTransform.getPosition()
          if currentPositionOfCamera != .zero {
              let distanceFromCamera = frame.camera.transform.getPosition().distanceFrom(position: currentPositionOfCamera)
              print(&quot;Distance from raycast:&quot;,distanceFromCamera)
              if (distance &lt; 0.5) {
                   print(&quot;Too Close&quot;)
              }
          }
  
      } 
  </code></pre>