相关疑难解决方法(0)

AR参考图像平面在iOS Swift中的位置不正确?

我正在使用ar参考图像处理名片配置文件信息.当参考检测到它将显示公司首席执行官的详细信息,地址,照片和团队成员信息等.最初检测到图像,飞机将使用runAction amintion 向右移动.

我的问题是检测到的,飞机位置稳定,它在这里和那里移动.如何使用参考图像拟合平面位置.

这是我的结果截图:[![在此输入图像描述] [1]] [1]

这是我使用的代码:

var weboverlayview: CALayer?
var loadWeb: UIWebView?
override func viewDidLoad() {
    super.viewDidLoad()

    // Set the view's delegate
    sceneView.delegate = self

    // Show statistics such as fps and timing information
    sceneView.showsStatistics = true
    sceneView.autoenablesDefaultLighting = true
    let ARScene = SCNScene()
    sceneView.scene = ARScene

}

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

    // Create a session configuration
    let configuration = ARWorldTrackingConfiguration()
    configuration.planeDetection = [.vertical, .horizontal]
    configuration.detectionImages = ARReferenceImage.referenceImages(inGroupNamed: "AR Resources", bundle: nil)
    // Run …
Run Code Online (Sandbox Code Playgroud)

xcode augmented-reality ios swift

3
推荐指数
1
解决办法
524
查看次数

标签 统计

augmented-reality ×1

ios ×1

swift ×1

xcode ×1