Away3D 4.x rotate the View3D itself.

Software: Away3D 4.x

JoshuaEX, Newbie
Posted: 09 October 2012 06:08 PM   Total Posts: 3

I’ve successfully created a panorama viewer in pure AS3 with Away3D 4, with the camera going through proper tilt and pan rotations and everything. The width and height get set properly as well to whatever I want, which is great. The panorama viewer works just as I want, it’s fantastic.

What then happens is I’ve added the panorama viewer to a parent with a lovely graphical border. The parent can be dragged, scaled, and rotated throughout the stage, but the Away3D view itself of the panorama never rotates or scales. The view will drag with the parent object, but visually the view does not rotate or scale at all.

I can tell the panorama viewer class as a whole is being rotated, as when I rotate the parent and click within, I can still interact with the panorama to tilt and pan as normal. In fact, since the view is staying with the exact same rotation to the stage (it appears straight up and down), there is empty space inside the parent border around it that can be interacted with, and the view itself rotates the camera because the panorama viewer is being interacted with.

So I know both the parent of the panorama viewer, and the panorama viewer (which extends sprite) itself are being rotated. The view3d which allows the panorama to be seen within the viewer is never visually rotating with the panorama viewer.

So in summation: I have a panorama viewer class that uses Away3D 4.x. I want to instantiate and add that object to a parent. I want to rotate that parent, and have the Away3D view of the panorama viewer rotate WITH the parent.

Is it at all possible to even rotate the view itself? view.rotate does not seem to do anything, which is not a surprise as view.scaleX/Y/Z, or view.z are not meant to do anything as well.

   

thatflashdude, Newbie
Posted: 09 October 2012 06:37 PM   Total Posts: 19   [ # 1 ]

its not clear what your problem is..maybe you can discuss a bit more on how you implemented the panorama. are you using skybox? i have had better control with 6 planes inside an Object3dContainer and then placing a camera inside that

   

JoshuaEX, Newbie
Posted: 09 October 2012 06:46 PM   Total Posts: 3   [ # 2 ]
thatflashdude - 09 October 2012 06:37 PM

its not clear what your problem is..maybe you can discuss a bit more on how you implemented the panorama. are you using skybox? i have had better control with 6 planes inside an Object3dContainer and then placing a camera inside that

There’s two options depending on the user’s settings. The panorama can be created from six images fed into it using a skybox, or it can be a spherical panorama created using spheregeometry and an image for a texture.

The panorama itself (as in the skybox, or sphere) rotates just fine. The camera rotates just as I want. What I want is for the view3D itself to rotate on the stage.

   

Avatar
Fabrice Closier, Administrator
Posted: 09 October 2012 07:01 PM   Total Posts: 1265   [ # 3 ]

You cannot rotate the viewport but you can fake it using last rendered image. Your “fake” viewport is then simply a plane fitting entire viewport.

You need another part of the viewport or another view to render or another camera and content placed far away from the “viewport” camera to render the elements in scenery that will be used to animate the “postcard”

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X