[Papervision3D] child objects

Kim Daniel Arthur kim at kimdanielarthur.com
Thu Mar 20 10:21:54 PST 2008


Hi,

Assuming that each child is placed into the parentObject (carousel)
and are facing forward at that point when the carousel is at rotationY
= 0. You should be able to just set the rotationY of the child object
to the opposite of the parentObject's y rotation?

childObject.rotationY = -parentObject.rotationY;

Kim

On 20/03/2008, mark prettyman <mark_prettyman at hotmail.com> wrote:
>
>  Hi
>
>  As a follow-on from this,
>
>  How would you get the child to face a world Z axis.
>
>  so the child would always point forward as it rotated.
>
>  Cheers Mark
>
> > Date: Thu, 20 Mar 2008 18:12:15 +0100
> > From: kim at kimdanielarthur.com
> > To: papervision3d at osflash.org
> > Subject: Re: [Papervision3D] child objects
>
> >
> > Hi,
> >
> > //add a object as a child to another object
> > parentObject.addChild( childObject );
> >
> > //move the child object to 1000,1000 relative to the parent objects origin
> > childObject.x = 1000;
> > childObject.z = 1000;
> >
> > //rotate the parent object on the y axis, the child object will be
> > rotated around the parents origin
> > parentObject.rotationY = 100;
> >
> > Kim
> >
> > On 20/03/2008, Paul69 <paultompson1969 at hotmail.co.uk> wrote:
> > >
> > > Hi Guys,
> > >
> > > (sorry this is a repost...I had to join the mailing list...or I wouldnt
> get
> > > any replies)
> > >
> > > I have been pulling my hair out with this problem for ages now.
> > > Is there away (please please some code) to add an object to another
> object
> > > as a child. so that when the
> > > parent object rotates the child object rotates relative to the parent.
> > > I am building a carousel which at the moment rotates the camera around.
> I
> > > need to set an object at the origin, add all the individual planes as
> > > children to the origin object. then when the parent object rotates the
> > > carousel will rotate. I don't know if this is possible in papervision it
> is
> > > very easy to achieve in director shockwave3D (but i need to do this in
> > > Flash).
> > >
> > > Thanks for any help
> > >
> > > Paul
> > > --
> > > View this message in context:
> http://www.nabble.com/child-objects-tp16183723p16183723.html
> > > Sent from the Papervision3D mailing list archive at Nabble.com.
> > >
> > >
> > > _______________________________________________
> > > Papervision3D mailing list
> > > Papervision3D at osflash.org
> > >
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > >
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> >
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> ________________________________
> Messenger on the move. Text MSN to 63463 now!
> _______________________________________________
>  Papervision3D mailing list
>  Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>



More information about the Papervision3D mailing list