No camera, no lights

Software: Away3D 4.x

movieclip, Newbie
Posted: 06 July 2015 02:04 PM   Total Posts: 10

I create plane, camera and light in Away Builder.
After loading AWD file in project, I have:

for (var i:int = 0; i < scene.numChildren; i++) { 
  var obj:* =  scene.getChildAt(i);

// depth, class, name, numChildren
trace (i, obj, obj.name, obj.numChildren);
}

traces:

0 [object ObjectContainer3D] DirectionalLight1 0
1 [object Mesh] Mesh1 0
2 [object ObjectContainer3D] Camera1 0

Camera and Light is empty containers and (obj as Camera3D) return null.

* yes, I see mesh, it correctly added to scene

   

movieclip, Newbie
Posted: 06 July 2015 03:06 PM   Total Posts: 10   [ # 1 ]

I found mistake

protected function onModelLoadSuccess(event:LoaderEvent):void
{
_scene = (event.target as Loader3D).clone() as ObjectContainer3D;
}

clone() did not clone camera or lights.

Sorry :(

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X