Skip to content

Conversation

@WestLangley
Copy link
Collaborator

Object3D.attach( object ) adds object as a child of this, while maintaining the object's world transform.

Fixes #6426 and replaces #16380.

This method alleviates the need for THREE.SceneUtils.attach/detach(), which can be deprecated in a later PR.

newParent.attach( object ); // detaches from oldParent...

oldParent.attach( object ); // ...now it's back where it started

@WestLangley WestLangley added this to the r105 milestone May 23, 2019
@mrdoob mrdoob merged commit 8c7002e into mrdoob:dev May 23, 2019
@mrdoob
Copy link
Owner

mrdoob commented May 23, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

THREE Group and Object3D add child BUG.

2 participants