[Papervision3D] rotation without skew
Felix Turner
felixturner at gmail.com
Wed Oct 17 14:09:16 PDT 2007
Hi Andrei,
> I followed your advice with the camera and the displayobject3d, but now,
the planes inside it no longer have focus. When I try to add events to them
i get an error.
AFAIK this is a bug in PaperVision: 3D Objects that are children of other 3D
Objects do not fire mouse events.
(http://osflash.org/pipermail/papervision3d_osflash.org/2007-May/thread.html
#6156). Next time I get some free time I'm going to try to find a solution.
My work around was to use away3D instead.
- Felix
_____
n3d-bounces at osflash.org [mailto:papervision3d-bounces at osflash.org] On Behalf
Of Stoleru Andrei
Sent: Wednesday, October 17, 2007 7:58 AM
To: papervision3d at osflash.org
Subject: Re: [Papervision3D] rotation without skew
Hi Felix
I followed your advice with the camera and the displayobject3d, but now, the
planes inside it no longer have focus. When I try to add events to them i
get an error. Is there something I missed?
//
for (var i:Number=0;i<52;i++) {
var material:InteractiveMovieMaterial = new InteractiveMovieMaterial(new
Letter(letters[i]), true,true);
material.animated = true;
material.smooth = true;
material.oneSide=true;
//
var plane:Plane=new Plane(material,Width,Height);
god.addChild(plane,'plane'+i);
plane.x=Math.random()*1000-500;
plane.y=Math.random()*1000-500;
plane.z=Math.random()*1000-500;
plane.rotationX=Math.random()*360;
TweenLite.to(plane,1,{x:sx,y:sy,z:sz,rotationX:0});
//
if (plane.container!=null) {
var movieSprite:Sprite=plane.container;
movieSprite.addEventListener(MouseEvent.MOUSE_OVER, rollOver);
movieSprite.addEventListener(MouseEvent.MOUSE_OUT, rollOut);
movieSprite.addEventListener(MouseEvent.MOUSE_DOWN, press);
} else {
trace('no container for '+i);
}
//
if (i>=26) {
plane.rotationY=180;
} else {
plane.rotationY=0;
}
planes[i]=plane;
sx+=Width+spacing;
if (i==25) {
sx=-4.5*(Width+spacing);
sy=Width+spacing;
}
if ((i==9) || (i==35)) {
sx=-4*(Width+spacing);
sy-=(Width+spacing)
}
if ((i==18) || (i==44)) {
sx=-3.5*(Width+spacing);
sy-=(Width+spacing);
}
}
//
Thanks again,
Andrei
On Oct 13, 2007, at 11:01 PM, Felix Turner wrote:
Hi,
for tiltviewer I created 1 DisplayObject3D for the grid, then set the images
to be children of the grid. The rotationX and rotationY of the grid object
are set based on the stage mouseX and mouseY. To reduce the perspective skew
on the grid, try setting the cameraZ to be -1000 (or similar) and set your
objects to be bigger, like Carlos said.
- Felix
-----Original Message-----
From: papervision3d-bounces at osflash.org
[mailto:papervision3d-bounces at osflash.org] On Behalf Of Carlos Lunetta
Sent: Saturday, October 13, 2007 5:09 AM
To: papervision3d at osflash.org
Subject: Re: [Papervision3D] rotation without skew
Hi Andrei
I'm 75% sure that it's all a matter of playing with the camera z and camera
focus values.
What I usually do is I connect camera z to up/down keystrokes and camera
focus to right/left; When a setting with little distortion is achieved, I
trace the values and then use them as fixed in the app...
Stoleru Andrei wrote:
Hi all
I already asked about this and tried the solutions you all suggested:
I want to do a rotation on x and y axes but without the skew of the
object. My target effect would be http://www.airtightinteractive.com/
projects/tiltviewer/app/
Instead all I get is www.rossino.it/preview.html
I have a displayobject3d ( god ) where I add all my other objects
(planes) and I do the rotation on x and y of god based on the mouseX,
respectively, mouseY.
god is at 0,0,0 and the "g plane" is in the center of the stage.
Any idea?
Andrei S.
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20071017/99ba45d6/attachment-0001.html
More information about the Papervision3D
mailing list