Scenekit 相对于相机移动对象
我已经在 Scenekit/ARKit 中放置了一个节点,
现在我想借助按钮将节点/对象左右移动。问题是当我移动相机/设备并按下右侧按钮时,节点沿首次启动的轴方向移动,而不是相对于相机向右移动。我怎样才能实现这个目标?
点击右键时的当前代码
position.x += 0.2
I've placed a node in Scenekit/ARKit
Now I want to move node/object to right and left with help of buttons. Issue is when I moves my camera/device and press right button, node moves in direction of axis it was first initiated, Not moves right with respect to camera. How can I achieve this?
current code on tapping right button
position.x += 0.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是解决方案
Here is the solution