kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

[Broomstick] ObjectContainer3D set parent method #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Very strange method, does not change children list.

// add mesh
parent.addChild(obj);

trace(parent.numChildren) // 1

//free parent link
obj.parent = null // clear scene links, remove from scene, but
trace(parent.numChildren) // 1 again

obj.parent = parent; // zero effect

Original issue reported on code.google.com by System.g...@gmail.com on 26 Mar 2011 at 12:38

GoogleCodeExporter commented 9 years ago
Setting parents is not supposed to happen manually, use removeChild instead. 
Fixed by removing the "parent" setter from the public interface.

Original comment by david.le...@gmail.com on 28 Apr 2011 at 10:19

GoogleCodeExporter commented 9 years ago
Thanks. 

Original comment by System.g...@gmail.com on 28 Apr 2011 at 10:21