[Papervision3D] Need help, please!
David Lawson
tech.lawson at gmail.com
Sat Jan 5 22:03:34 PST 2008
I have just uploaded my swf with the code from Andy included.
http://www.c1nz.com/pv3d/car.swf
On Jan 6, 2008 6:59 PM, Roy Wiggins <bungadunga at gmail.com> wrote:
> That's standard output, I think; all DisplayObject3D instances do that
> (unless you specify a name, in which case it's 'DisplayObject3D: <<name>>').
>
>
> On Jan 5, 2008 9:43 PM, David Lawson < tech.lawson at gmail.com> wrote:
>
> > Argh, it's not working again - can someone please fix this?
> >
> > //VARIABLES USED
> > var ease:Number = 5; //higher = more easing
> > var radius:Number = 1300; //radius camera floats on
> > camera.extra = { goPosition:new DisplayObject3D() };
> >
> > //ON TICK CODE
> > camera.extra.goPosition.copyPosition(car);
> >
> > //convert rotation to x/z
> > var ang = car.rotationY*Math.PI/180-1/2*Math.PI ;
> > var xOff = Math.cos(ang);
> > var zOff = Math.sin(ang);
> >
> > var goPosition = camera.extra.goPosition;
> >
> > goPosition.x += xOff *radius;
> > goPosition.z += zOff * radius;
> > goPosition.y += 400;
> >
> > It always comes up with 'DisplayObject3D: null'
> >
> >
> >
> > On Jan 6, 2008 4:37 PM, David Lawson < tech.lawson at gmail.com > wrote:
> >
> > > This code comes up with heaps of 'null's. Do I need to import
> > > anything?
> > >
> > > //VARIABLES USED
> > > var ease:Number = 5; //higher = more easing
> > > var radius:Number = 1300; //radius camera floats on
> > > camera.extra = { goPosition:new DisplayObject3D() };
> > >
> > > //ON TICK CODE
> > > camera.extra.goPosition.copyPosition(car);
> > >
> > > //convert rotation to x/z
> > > var ang = car.rotationY*Math.PI/180-1/2*Math.PI ;
> > > var xOff = Math.cos(ang);
> > > var zOff = Math.sin(ang);
> > >
> > > var goPosition = camera.extra.goPosition;
> > >
> > > goPosition.x += xOff *radius;
> > > goPosition.z += zOff * radius;
> > > goPosition.y += 400;
> > >
> > > camera.x -= (camera.x - goPosition.x) /ease;
> > > camera.y -= (camera.y - goPosition.y);
> > > camera.z -= (camera.z - goPosition.z) /ease;
> > >
> > > On Jan 6, 2008 4:30 PM, Andy Zupko <azupko at zupko.info> wrote:
> > >
> > > > Well, I just looked at what I sent you, goPosition is actually a
> > > > DisplayObject3D – not a Number3D – try switching it to that and it should
> > > > work (do3d has copyPosition function which I used)
> > > >
> > > >
> > > >
> > > > *From:* papervision3d-bounces at osflash.org [mailto:
> > > > papervision3d-bounces at osflash.org] * On Behalf Of *David Lawson
> > > > *Sent:* Saturday, January 05, 2008 10:05 PM
> > > > *To:* papervision3d at osflash.org
> > > > *Subject:* Re: [Papervision3D] Need help, please!
> > > >
> > > >
> > > >
> > > > I am going to be making a website where you drive the car into
> > > > garages and it opens up parts of the website.
> > > >
> > > > Drive into the 'downloads' garage and downloads comes up.
> > > >
> > > > On Jan 6, 2008 3:57 PM, Makc < makc.the.great at gmail.com> wrote:
> > > >
> > > > On Jan 6, 2008 4:45 AM, David Lawson <tech.lawson at gmail.com> wrote:
> > > >
> > > > Can you please put that in this code, because when I do it comes up
> > > > with:
> > > >
> > > > ReferenceError
> > > >
> > > >
> > > >
> > > > ...and the point of doing so would be what? you will not have
> > > > neither complete application, nor understanding of what it takes and how to.
> > > >
> > > >
> > > > _______________________________________________
> > > > 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
> > > >
> > > >
> > >
> >
> > _______________________________________________
> > 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080106/2cdf84f4/attachment.html
More information about the Papervision3D
mailing list