[Papervision3D] I got blackout
Frank Weinhold
Frank.Weinhold at neue-digitale.de
Thu Sep 13 06:43:40 PDT 2007
Hi katopz,
There's nothing wrong in the lookAt Method. You just need to set a
up-vector for your view. The standard up-vector for the lookAt Method is
(0,1,0). So if you look exactly up or down, like in your special case,
both viewing-direction and up-vector are parallel.
You can fix it like this:
var upDir:Number3D = (camera.x == cube.x && camera.z == cube.z) ? new
Number3D(1,0,0) : new Number3D(0,1,0);
camera.lookAt(cube, upDir);
Cheers
Frank
________________________________
Von: papervision3d-bounces at osflash.org
[mailto:papervision3d-bounces at osflash.org] Im Auftrag von katopz
Gesendet: Donnerstag, 13. September 2007 09:19
An: Papervision3D at osflash.org
Betreff: [Papervision3D] I got blackout
i got this problem when try to do this
http://sleepydesign.com/labs/as3/PaperVision3D/MayaCameraControl/
and try press green cone for trouble
u can try this problem in
http://papervision3d.googlecode.com/svn/trunk/as3/trunk/examples/Cube/ma
in.as
then replace line#133 with
private function update3D():void
{
//cube.rotationY = container.mouseX / 2;
//cube.rotationX = container.mouseY / 2;
camera.x=0
camera.y=1000
camera.z=0
// Render
scene.renderCamera( this.camera );
}
and all thing blackout don't know why, maybe something wrong in lookAt
method
anyway you can try replace camera.x=0 with camera.x=container.mouseX/2;
and try to move mouse to center (x=0), it's gone black at that point too
quick test here :
http://sleepydesign.com/labs/as3/PaperVision3D/MayaCameraControl/Cube.sw
f
thx!
katopz
http://www.sleepydesign.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070913/b9339202/attachment.html
More information about the Papervision3D
mailing list