[Papervision3D] Placing planes along a carousel.

xero xero.nu at gmail.com
Tue Aug 19 09:26:28 PDT 2008


 hey...
here's come code i used in a demo once.
hope it helps!

[code]

  var planeCount:Number = 20;
  var obj:DisplayObject3D;

  //create a center point
  obj = new displayObject3D;
  scene.addChild(obj);

    for (var i:Number = 0; i < planeCount; i++ )
    {
     var thePlane:Plane =  new Plane(material, 100, 100, 2, 2);
     var rotation:Number = (360/planeCount)* i ;
     var rotationRadians:Number = (rotation-90) * (Math.PI/180);
     thePlane.z = (radius * Math.cos(rotationRadians)) * -1;
     thePlane.x = radius * Math.sin(rotationRadians) * -1;
     thePlane.y = 100;
     thePlane.lookAt(obj);
     scene.addChild(thePlane);
    }


[/code]

flash's new most popular effect ;D
____  ___
\   \/  /___________  ____
.\     // __ \_  __ \/ _  \
./     \  ___/ | | \( <_>  )
/___/\  \___  >__|---\____/
|     \_/   \/        |
| xero harrison       |
| xero.nu at gmail.com   |
| http://xero.nu      |
| http://fontvir.us   |
| http://hexarray.nu  |
| http://0x000000.nu  |
| http://xero.owns.us  |
`---------------------'




> ---------- Forwarded message ----------
> From: Sceneshift <jon at sceneshift.com>
> To: papervision3D at osflash.org
> Date: Tue, 19 Aug 2008 08:15:00 -0700 (PDT)
> Subject: [Papervision3D] Placing planes along a carousel.
>
> Hi,
>
> I having some real trouble figuring out the math for positioning planes so
> that they form a circle (or rather, a radius). I have the total number of
> planes and the id of the plane I am positioning, but from then on I am
> pretty lost. Can anyone point me in the right direction?
> --
> View this message in context:
> http://www.nabble.com/Placing-planes-along-a-carousel.-tp19052523p19052523.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080819/c2b8d78c/attachment.html 


More information about the Papervision3D mailing list