three 使用 attach 更换模型当前分组
three更换模型当前分组位置,使用世界坐标计算坐标,使用移出父级和移入父级旋转放缩计算当前放缩???算寄人。。结果 别用 add,用 attach 就行了。内牛满面!!!!
const onConfirmBtnClick = ()=> {
if(nowMoveParent.value == null){
SMART.message.warning("请选择需要移动到的目标位置!");
return
}
let dragNode = nowMoveChild.value.option.meshObj
let node = nowMoveParent.value[0].meshObj
if(dragNode.uuid == node.uuid){
SMART.message.warning("不能移动到自身!");
return
}
node.attach(dragNode);
onCancelBtnClick()
}
哭死,写了好久,结果发现有这个方法!!!

浙公网安备 33010602011771号