I am having trouble removing an Object from the scene. I basically
create a plane, add it to the scene, then when I try to remove it
later it gives me this error:
TypeError: Error #1034: Type Coercion failed: cannot convert
obj...@28a80089 to away3d.core.base.Object3D.
I've traced the plane after I created it and it reads as an Object and
not Object3D.
Here is some of the code:
// create the plane
var zombiePlane:Plane = new Plane({ material: material, rotationX: 90,
z: zPos, width: 85, height: 187, x: _mathUtils.randRange(-110, 130),
y: _yPos});
// add the plane to the scene
_viewPort3D.scene.addChild(zombiePlane);
Then, later in the code:
_viewPort3D.scene.removeChild(zombiePlane);
Please help.
Thanks =)