收藏
回答

mesh-shape 更改对象position属性后,mesh位置未跟随变动?

var parent = this.scene.getElementById("objs");
var xrFrameSystem = wx.getXrFrameSystem();
var o = this.scene.createElement(xrFrameSystem.XRGLTF);
o.setAttribute("node-id","obj");
o.setAttribute("position","0 0 0");
o.setAttribute("rotation","0 0 0");
o.setAttribute("scale","0.2 0.2 0.2");
o.setAttribute("model","gltf-damageHelmet");
o.event.add("touch-shape",this.touchFunction);
o.setAttribute("mesh-shape","");

动态生成GLTF模型并设置mesh-shape,touchFunction方法中修改了该对象的position,但似乎mesh没有跟随移动,因为只有点击初始位置才会触发点击事件
回答关注问题邀请回答
收藏

1 个回答

  • 偏执狂
    偏执狂
    2023-06-09

    遇到同样的问题

    2023-06-09
    有用
    回复
登录 后发表内容