Thanks. That make sense.
On Nov 23, 10:57 am, "Rob Bateman" <[EMAIL PROTECTED]> wrote: > hovercamera3d takes control of all positional and rotational data of the > camera. If you need a camera to do something different, you are better off > starting with Camera3d and taking what you want from the code of > hovercamera3d. For example, something like this: > > camera.moveTo(0, 12000*(1 + mouseY/stage.stageHeight), 0); > camera.rotateTo(0, (view.y - mouseX)/2, 0); > camera.moveBackward(18000 - mouseY*10); > camera.lookAt(new Number3D()); > > will still retain the horizontal rotation of the hovercamera3d, but leaving > you to define what you want to do with the vertical offset of the camera. In > this case, y is influenced by the mouseY property > > hth > > Rob > > > > On Sat, Nov 22, 2008 at 1:01 PM, zerodevice <[EMAIL PROTECTED]> wrote: > > > hi, i'm trying to do the camera to function like this website does. > >http://ecodazoo.com/ > > > here's my code but it doesn't work well. > > > //------------------------------------------------------------------------------------// > > //Away3D Loop > > function Away3DLoop(event:Event):void > > { > > //Allow Mouse To Zoom And Rotate > > if (_rotCamera) > > { > > if (_firstClick == true) > > { > > _firstClick = false; > > _lastMouseX = view3D.mouseX; > > _lastMouseY = view3D.mouseY; > > } > > _dragX = (view3D.mouseX - _lastMouseX); > > _dragY = (view3D.mouseY - _lastMouseY); > > _lastMouseX = view3D.mouseX; > > _lastMouseY = view3D.mouseY; > > hoverCamera3D.targetpanangle += _dragX; > > hoverCamera3D.targettiltangle += _dragY; > > > //This will work for the rotation around the object at 0,0,0 > > hoverCamera3D.hover(); > > > //if i add this two lines below and take away the hover(); > > function it will allow to move up and down > > //hoverCamera3D.target.y+=_dragY; > > //hoverCamera3D.y+=_dragY; > > > //but if i put the ".target.y", ".y", and ".hover" all together, > > it will work really weird. > > } > > > // rerender viewport on each frame > > view3D.render(); > > } > > > //------------------------------------------------------------------------------------// > > > any help would be a great deal. > > > thanks in advance. > > -- > Rob Bateman > Flash Development & Consultancy > > [EMAIL PROTECTED]
