0

我有一个关于 Reality Composer 的问题。我想用触发不同行为的按钮构建一个配置器。默认情况下,无法在 Reality Composer 中创建随摄像机移动的菜单。只能将按钮放置在场景中。但是当观看者移动 iPhone 时,按钮会随着对象旋转。它们不会直接显示在显示屏上。

是否可以通过编程将平面连接到相机上,以便无论我将智能手机移动到何处,该表面始终在屏幕上?

我创建了一个简单的 Reality Composer 文件,其中包含一个相机和一个名为“plane”的表面。不能将此表面绑定到相机吗?我该怎么做?不幸的是,在编程方面我是个新手。

还是有另一种解决问题的可能性?

非常感谢

绵羊

这是代码:

'''

    {
  "__content" : [
    {
      "scenes" : [
        {
          "__content" : [
            {
              "arAnchorSpecification" : {
                "alignment" : "horizontal",
                "name" : "surface"
              },
              "behaviors" : [

              ],
              "gravity" : [
                0,
                -9.8000001907348633,
                0
              ],
              "identifier" : "71C34836-D049-4754-A65D-1160B13652A0",
              "material" : "concrete",
              "overrides" : {
                "children" : {
                  "2F283C03-F682-4731-B9BF-94B9CACA478C" : {
                    "overrides" : {
                      "arguments" : [
                        [
                          "bevelRadius",
                          {
                            "typeName" : "Double",
                            "value" : 1.0000000000000001e-05
                          }
                        ],
                        [
                          "depth",
                          {
                            "typeName" : "Double",
                            "value" : 0.002
                          }
                        ],
                        [
                          "height",
                          {
                            "typeName" : "Double",
                            "value" : 0.70000000000000007
                          }
                        ],
                        [
                          "material",
                          {
                            "typeName" : "String",
                            "value" : "paintEnamelMatte"
                          }
                        ],
                        [
                          "type",
                          {
                            "typeName" : "String",
                            "value" : "box"
                          }
                        ],
                        [
                          "width",
                          {
                            "typeName" : "Double",
                            "value" : 1
                          }
                        ]
                      ],
                      "factory" : {
                        "identifier" : "com.apple.rc.af.CoreAssetFactories.PrimitiveShapeAssetFactory",
                        "version" : "1.0"
                      },
                      "runtimeAttributes" : [
                        [
                          "RuntimeIdentifier",
                          {
                            "typeName" : "UUID",
                            "value" : "4865E314-5DA9-467E-AD08-5125F980E05A"
                          }
                        ],
                        [
                          "entityName",
                          {
                            "typeName" : "String",
                            "value" : "plane"
                          }
                        ]
                      ]
                    },
                    "transform" : {
                      "matrix" : [
                        1,
                        0,
                        0,
                        0,
                        0,
                        1,
                        0,
                        0,
                        0,
                        0,
                        1,
                        0,
                        0,
                        0,
                        0,
                        1
                      ]
                    }
                  },
                  "FDB6E89C-A8A2-4ED0-B059-EBBED9561A03" : null
                },
                "factory" : null,
                "runtimeAttributes" : [
                  [
                    "isAccessibilityEnabled",
                    {
                      "typeName" : "Bool",
                      "value" : false
                    }
                  ]
                ]
              },
              "physicsMode" : "grid",
              "title" : "Szene",
              "viewTransform" : {
                "cameraTransform" : [
                  0.99945449829101562,
                  2.8870999813079834e-08,
                  -0.033023688942193985,
                  0,
                  -0.011933800764381886,
                  0.93242228031158447,
                  -0.36117333173751831,
                  0,
                  0.030792050063610077,
                  0.36137062311172485,
                  0.93191361427307129,
                  0,
                  0.17781107127666473,
                  0.34682965278625488,
                  0.8532184362411499,
                  1
                ],
                "sceneTransform" : [
                  1,
                  0,
                  0,
                  0,
                  0,
                  0.99999994039535522,
                  0,
                  0,
                  0,
                  0,
                  0.99999994039535522,
                  0,
                  0,
                  0,
                  0,
                  1
                ]
              }
            }
          ],
          "__version" : 5
        }
      ],
      "tags" : {
        "__content" : [
          {
            "tagsStore" : {

            }
          }
        ],
        "__version" : 1
      }
    }
  ],
  "__version" : 1
}

'''

4

0 回答 0