[Papervision3D] RE : Re: RE : RE : Re: Rotation around Arbitrary axis addition to DisplayObject3D
flashnine at gmail.com
Tue Jun 26 09:42:19 EDT 2007
Ok I understand now - yes you will need Math for this unless you want a
messy hack (which i can really try to think of) :) But I can't promise
anything...hope you get that other code to work for now...
On 6/26/07, Moon Moon <moon_pv3d at yahoo.fr> wrote:
> So to explain what I want to do:
> I have a scene, I put in it a rootNode which is a displayObject3D
> representing a collada fille created from a 3ds file.
> I want that when the user clicks on 'M', the camera rotates arround the
> object (arround the 3d model).
> FIRST IDEA:
> My first idea was to do:
> But the problem is that rootNode rotates attound its ORIGIN which doesn't
> match with ITS center. so it dosn't show a rotation of a camera arround the
> object but a rotation of rootNode arround its origin. I know that rotating
> the rootNode is a Fake of rotation the camera arround the object , it is a
> trick. SO If i can rotate the rootNode arround its CENTER it will be
> THE SECOND IDEA: some people gave me this solution:
> private function moveCamera():void
> var dist:Number = camera.distanceTo(rootNode);
> But is is the same problem, the distance between the camera and the
> rootNode is calculated not to the center of the rootNode but its ORIGIN, so
> the movement is horrible. In addition to that when i press many times on the
> 'm' key, the camera became far and far from the rootNode.
> SO I want to use my first idea, the only problem is HOW to make a rotation
> on the rootNode arround ITS center instead of its origin.
> DO YOU HAVE ANY IDEA ?
> PS: which code do you want exactly ?
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails<http://www.trueswitch.com/yahoo-fr/>vers Yahoo! Mail
> Papervision3D mailing list
> Papervision3D at osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Papervision3D