gpt4 book ai didi

ios - 添加SCNPhysicsBallSocketJoint时SceneKit崩溃

转载 作者:行者123 更新时间:2023-12-02 06:59:35 25 4
gpt4 key购买 nike

我使用ARKit和SceneKit进行人脸跟踪,因此在某些情况下,我需要重设场景。这是我的重置代码:

sceneView.scene.physicsWorld.removeAllBehaviors()

let configuration = ARFaceTrackingConfiguration()
configuration.isLightEstimationEnabled = true
sceneView.session.run(configuration, options: [.resetTracking, .removeExistingAnchors])

下一步是设置我要添加节点的场景,并通过 SCNPhysicsBallSocketJoint 链接它们。但是此步骤会导致崩溃
Thread 8 name:  com.apple.scenekit.scnview-renderer  Dispatch queue: com.apple.scenekit.renderingQueue.ARSCNView0x153d0a8d0
Thread 8 Crashed:
0 SceneKit 0x00000001bad70600 btUnionFind::unite+ 2950656 (int, int) + 8
1 SceneKit 0x00000001bad705cc btDiscreteDynamicsWorld::calculateSimulationIslands+ 2950604 () + 296
2 SceneKit 0x00000001bad6f218 btDiscreteDynamicsWorld::internalSingleStepSimulation+ 2945560 (float) + 136
3 SceneKit 0x00000001bad6f138 btDiscreteDynamicsWorld::stepSimulation+ 2945336 (float, int, float) + 276
4 SceneKit 0x00000001babb7334 -[SCNPhysicsWorld _step:] + 180
5 SceneKit 0x00000001babff774 -[SCNRenderer _update:] + 964
6 SceneKit 0x00000001bac01c50 -[SCNRenderer _drawSceneWithNewRenderer:] + 196
7 SceneKit 0x00000001bac02208 -[SCNRenderer _drawScene:] + 48
8 SceneKit 0x00000001bac025b0 -[SCNRenderer _drawAtTime:] + 636
9 SceneKit 0x00000001bac9c9bc -[SCNView _drawAtTime:] + 452
10 ARKit 0x00000001c275b9cc -[ARSCNView _drawAtTime:] + 40
11 SceneKit 0x00000001bab638d0 __69-[NSObject+ 800976 (SCN_DisplayLinkExtensions)

奇怪的是,在首次设置场景时,将 SCNPhysicsBallSocketJoint 关节添加到节点时没有崩溃。我认为也许是错误重置场景的原因。请帮忙。

最佳答案

SCNPhysicsBallSocketJoint中的节点应具有physicalBodyies。

关于ios - 添加SCNPhysicsBallSocketJoint时SceneKit崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62338169/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com