Three.js add an object to a group but keep global position/rotation/scale as it was

前端 未结 1 761
执笔经年
执笔经年 2020-11-29 12:46

I want to move an object from one group (or world/scene) to another group, but keep it\'s global transformation intact. Basically, I don\'t want to see the object change.

相关标签:
1条回答
  • 2020-11-29 13:06

    EDIT: You can use the built-in method Object3D.attach():

    // add object as a child of parent, while maintaining the object's world transform
    
    parent.attach( object );
    

    three.js r.109

    0 讨论(0)
提交回复
热议问题