ARKIT和现实作曲家缩放节点
我正在尝试在 xcode 中创建一个节点,它将组合我从 RC 场景中获取的 2 个模型。
myTrack
myCar
它们都是单独对齐的,但它们有点太大了。 汽车正在使用一个循环,通过 JSON 控制它在轨道上的运动。
我想将它们添加到一个根节点并从那里使用管理缩放,
let mainAnchor = AnchorEntity(world: [0, 0, 0])
self.arView.scene.addAnchor(mainAnchor)
myTrackTransformed.addChild(mainAnchor)
myCar.addChild(mainAnchor)
mainAnchor.scale = [0.1, 0.1, 0.1]
但无论我放入缩放值,它们都不会执行任何操作。有什么想法吗?
I'm trying to create a node in xcode that will combine 2 of my models that I'm fetching from RC Scene.
myTrack
myCar
they both been aligned individually but they are a bit too big.
Car is using a loop that is controlling it movement around the track using JSON.
I want to add them to one root node and mange scale from there using
let mainAnchor = AnchorEntity(world: [0, 0, 0])
self.arView.scene.addAnchor(mainAnchor)
myTrackTransformed.addChild(mainAnchor)
myCar.addChild(mainAnchor)
mainAnchor.scale = [0.1, 0.1, 0.1]
but whatever I put in scale values they do nothing. Any ideas why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
锚必须是父节点,反之亦然:
但请记住,您需要提取模型实体(
myTrack
mycar )作曲家场景(rcscene.rcproject
)。The anchor must be a parent node, not vice versa:
But remember that you need to extract the model entities (
myTrack
andmyCar
) from the Reality Composer scene (RCScene.rcproject
).