【问题标题】:Reality Composer and dealing with multiple surfacesReality Composer 和处理多个表面
【发布时间】:2020-01-23 12:34:58
【问题描述】:
我想知道是否有办法让从现实作曲家导出的场景处理现实世界中的多个表面。
例如,如果我们创建一个带有球的场景,当我们触摸球时,它会在 x 轴上施加一个力。我希望当场景添加到桌子顶部时,如果球超出桌子的范围,球应该会掉下来。这没有发生,场景只在一个表面上工作。
是我遗漏了什么还是 Reality Composer 不支持复杂的场景?
谢谢
【问题讨论】:
标签:
swift
augmented-reality
arkit
realitykit
reality-composer
【解决方案1】:
在 Reality Composer 中,网格同时扮演两个重要角色:
如果您希望发生任何复杂的动态 - 唉,目前只能在网格上方和在网格上。
因此,从这个意义上说,现在 Reality Composer 不支持复杂的碰撞场景。
但作为安慰奖,你可以从.rcproject加载多个场景:
@IBAction func pressButton(_ sender: UIButton) {
if counter % 2 == 0 {
let sceneElements_04 = try! myScenes.loadScene_04()
arView.scene.anchors.append(sceneElements_04)
} else if counter >= 10 {
let sceneElements_25 = try! myScenes.loadScene_25()
arView.scene.anchors.append(sceneElements_25)
} else {
let sceneElements_12 = try! myScenes.loadScene_12()
arView.scene.anchors.append(sceneElements_12)
}