Just to make sure than this is not just some initializing thing. Try
to apply your lookat in render loop.

On 18 maalis, 09:49, ragaes <[email protected]> wrote:
> Hello,
>
> This is weird! I'm having the same problem!
>
> I was getting mad until I read your post... If you set the z
> coordinate a value different from 0, it works.
>
> Also if you set the orthografic lens some things won't work, for
> example wireframe objects made of Lines (GridPlane i.e.), which makes
> the application crash.
>
> Regards
>
> On 18 mar, 03:17, Stephen Hopkins <[email protected]> wrote:
>
> > I have created a view3D like so
>
> > view = new View3D({x: w / 2, y: h / 2});
> > camera= view.camera;
> > camera.x = 0;
> > camera.y = 500;
> > camera.z = 0;
> > camera.lookAt(new Vector3D(0, 0, 0));
> > camera.update();
> > view.scene.addChild(new Cube({width: 50, height: 50, depth: 50}));
> > addChild(view);
>
> > i also have a render loop that just calls view.render()
>
> > Now the weird part, the cube only appears if I do not set the camera.z
> > value to 0
>
> > camera.z = 1, cube appears
> > //camera.z = 0, cube appears, z is -1000 if I trace it
>
> > I am utterly confused. All I want is to position the camera above the
> > cube, and the camera to look at it from a top down view.
> > I haven't worked in Away3D for quite a while, (my projects used
> > Number3D), is there any change that I don't know about?
>
> > Thanks

Reply via email to