【问题标题】:SceneKit crash when adding SCNPhysicsBallSocketJoint添加 SCNPhysicsBallSocketJoint 时 SceneKit 崩溃
【发布时间】:2020-10-01 21:51:10
【问题描述】:

我正在使用 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 关节时没有崩溃。我想也许是错误重置场景的原因。请帮忙。

【问题讨论】:

    标签: ios swift crash scenekit arkit


    【解决方案1】:

    SCNPhysicsBallSocketJoint 中的节点应该有physicalBodyies。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-27
      • 1970-01-01
      • 2019-02-19
      • 2016-10-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-26
      相关资源
      最近更新 更多