Commit 753c3ff3 authored by suhuiguang's avatar suhuiguang

1.粒子与物体绑定

parent 19c587fb
...@@ -334,8 +334,12 @@ class StageActuator extends Component { ...@@ -334,8 +334,12 @@ class StageActuator extends Component {
userData.attachments.forEach(eid=>{ userData.attachments.forEach(eid=>{
const attachModel = modelParser.get(eid); const attachModel = modelParser.get(eid);
if (attachModel){ if (attachModel){
// attachModel.node.position.set(0,10,0); if (attachModel.isObjParser){//obj
parentObj.attach(attachModel); parentObj.attach(attachModel);
} else {//非obj
parentObj.attach(attachModel.obj || attachModel.node);
(attachModel.obj || attachModel.node).position.set(0,10,0);
}
} }
}); });
}); });
...@@ -415,6 +419,7 @@ class StageActuator extends Component { ...@@ -415,6 +419,7 @@ class StageActuator extends Component {
baseObjs={baseObjs} baseObjs={baseObjs}
ref={node => this.a3dRef = node} ref={node => this.a3dRef = node}
disabledEdit disabledEdit
enableModelParser
enableObjOutline enableObjOutline
enablePen enablePen
penProps={penProps} penProps={penProps}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment