Cylindrical pano

Software: Away3D 4.x

mvbaker, Newbie
Posted: 07 November 2013 08:38 PM   Total Posts: 2

I’m working on an app in Flash Builder 4 with Apache Flex framework 4.10. I’m trying to put a bitmap on the inside of a cylinder to create a panorama in an mxml component. This is my first attempt at Away3d so I’m not sure what needs to be done to get the camera in the right position and looking in the right direction and associate the HoverController with the camera. I see nothing on the screen.

Anyone here have some experience with this and can help troubleshoot? I attached a txt file with excerpts from the application. It’s a major app, about 250 files. So I just cut out the parts that I can.

TIA,
Mike

 

File Attachments
CylinderPanoProblem.txt  (File Size: 5KB - Downloads: 278)
   

Avatar
theMightyAtom, Sr. Member
Posted: 08 November 2013 08:19 AM   Total Posts: 669   [ # 1 ]

Something like this will set up your hover camera…

//setup controller to be used on the camera
var targ:ObjectContainer3D = new ObjectContainer3D();
targ.150;
   
cameraController = new HoverController(targ001000);
_view.camera.controller cameraController

You then have to handle your mouse events.
For some reason this has been taken out of the actual controller, and has to be set up manually.

For an example of the set-up, check out one of the examples, such as
https://github.com/away3d/away3d-examples-fp11/blob/master/src/Basic_Load3DS.as

You may want to limit the zoom, so the panorama doesn’t “flip”, i.e. suddenly point the other way when passing zero.
On this example I added a couple of lines to prevent this.
http://www.strombergindustries.com/felix/
(zoom is on mouse wheel)

stage.addEventListener(MouseEvent.MOUSE_WHEELzoom);

private function 
zoom(e:MouseEvent):void {
if ((cameraController.distance e.delta 100) > 10{
 cameraController
.distance += e.delta 100;
}

Good Luck!

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X