我想在AR投影时隐藏对象的背面。您会看到,物体在墙上有点加深了。我可以制作某种遮罩对象以使该对象不可见吗?
import UIKit
import RealityKit
class ViewController: UIViewController {
@IBOutlet var arView: ARView!
override func viewDidLoad() {
super.viewDidLoad()
// Load the "Box" scene from the "Experience" Reality File
let ARscene1 = try! Experience.load_1()
let ARscene2 = try! Experience.load_2()
let ARscene3 = try! Experience.load_3() //that scene, object named "mask"
// Add the box anchor to the scene
arView.scene.anchors.append(ARscene1)
arView.scene.anchors.append(ARscene2)
arView.scene.anchors.append(ARscene3)
}
}
图片:Click