Thanks for sharing ,man! :)) On Wed, Dec 8, 2010 at 5:53 PM, Kris Meister <[email protected]> wrote:
> > Dang my bad, every time i said PAN limit of HoverCamera3d in the > message above, I meant to say TILT limit of HoverCamera3d. > So much for good SEO. :-( > > On Dec 8, 10:43 am, Kris Meister <[email protected]> wrote: > > Hey All, > > > > I had a specific situation where I needed to pan the hovercamera > > without a limit. The current HoverCamera3d built into away3d has a pan > > limit of 90 and -90, as past those limits the model would flip in a > > bizarre manner. > > > > The key method was to detect if the camera had flipped around to the > > oppiste side: > > > > public function isflipped():Boolean{ > > var normalTilt:Number = > Math.abs(_currentTiltAngle)%360; > > return (normalTilt >= 90 && normalTilt <= 270); > > } > > > > then also to set the Matrix3d orientation of the camera accordingly: > > > > arcane override function update():void > > { > > var orientation : Vector3D = (isflipped())? new > Vector3D(0,1, 0) : > > new Vector3D(0, -1, 0); > > if (target != null){ > > > lookAt(target.transform.matrix3D.position,orientation); > > } > > super.update(); > > } > > > > Anyway here is the example: > http://dev.aliencom.net/away3d/hovercameraflip/ > > > > and here is the source: > http://dev.aliencom.net/away3d/hovercameraflip/source.zip > > > > My trig isn't strong so it took me a while to figure out how to fix, > > so I hope it helps someone else save time. > -- Michael Ivanov ,Programmer Neurotech Solutions Ltd. Flex|Air |3D|Unity| www.neurotechresearch.com http://blog.alladvanced.net http://www.meetup.com/GO3D-Games-Opensource-3D/ Tel:054-4962254 [email protected] [email protected]
