Browse Source

Clarify .attach() limitations (#22821)

WestLangley 3 years ago
parent
commit
6258b52c8c
2 changed files with 5 additions and 1 deletions
  1. 3 1
      docs/api/en/core/Object3D.html
  2. 2 0
      src/core/Object3D.js

+ 3 - 1
docs/api/en/core/Object3D.html

@@ -221,7 +221,9 @@
 		<p>Applies the rotation represented by the quaternion to the object.</p>
 		<p>Applies the rotation represented by the quaternion to the object.</p>
 
 
 		<h3>[method:this attach]( [param:Object3D object] )</h3>
 		<h3>[method:this attach]( [param:Object3D object] )</h3>
-		<p>Adds *object* as a child of this, while maintaining the object's world transform.</p>
+		<p>Adds *object* as a child of this, while maintaining the object's world transform.<br/><br/>
+		Note: This method does not support scene graphs having non-uniformly-scaled nodes(s).
+		</p>
 
 
 		<h3>[method:Object3D clone]( [param:Boolean recursive] )</h3>
 		<h3>[method:Object3D clone]( [param:Boolean recursive] )</h3>
 		<p>
 		<p>

+ 2 - 0
src/core/Object3D.js

@@ -405,6 +405,8 @@ class Object3D extends EventDispatcher {
 
 
 		// adds object as a child of this, while maintaining the object's world transform
 		// adds object as a child of this, while maintaining the object's world transform
 
 
+		// Note: This method does not support scene graphs having non-uniformly-scaled nodes(s)
+
 		this.updateWorldMatrix( true, false );
 		this.updateWorldMatrix( true, false );
 
 
 		_m1.copy( this.matrixWorld ).invert();
 		_m1.copy( this.matrixWorld ).invert();