[Papervision3D] setting pivot point for circular rotation
Jacob Dolinsky
jacobdol at mac.com
Tue Feb 26 11:07:24 PST 2008
> Try crating a new DisplayObject3D and then add your cubes as
> children of this object..
someting like this -
cubesContainer= new DisplayObject3D("cubesCont")
scene.addChild(cubesContainer);
for (var i:uint=0; i<3; i++){
var myCube=new Cube(....);
cubesContainer.addChild(myCube, "cube"+i.toString());
}
after this you can rotate the cubesContainer.. shoud work... i hope ;-)
>
>
> From: ilteris kaplan <ilteriskaplan at gmail.com>
> Date: February 26, 2008 9:43:42 AM PST
> To: papervision3d at osflash.org
> Subject: [Papervision3D] setting pivot point for circular rotation
> Reply-To: papervision3d at osflash.org
>
>
> Hello all,
>
> I have 5 cubes next to each other and I wan to set the center of the
> stage as a pivot point for rotating them around the screen. is this
> possible?
>
> oldschool way I can use this formula
> var x:Number = r*Math.cos(theta)
> var y:Number = r*Math.sin(theta)
>
> with r being the amplitude and theta as my points along the circle
> axis as my way. but I am not sure how to translate this to a pivot
> point. I would appreciate any advice!
>
>
>
>
>
> From: Andrew Dinmore <adinmore at hotmail.com>
> Date: February 26, 2008 9:49:22 AM PST
> To: <papervision3d at osflash.org>
> Subject: Re: [Papervision3D] setting pivot point for circular rotation
> Reply-To: papervision3d at osflash.org
>
>
> Just add the cubes to a DisplayObjectContainer3D, set the cube
> positions within it and rotate the that. Use a separate DOC3D for
> each cube if they need to rotate separately.
>
>
>
> From: ilteriskaplan at gmail.com
> To: papervision3d at osflash.org
> Date: Tue, 26 Feb 2008 12:43:42 -0500
> Subject: [Papervision3D] setting pivot point for circular rotation
>
> Hello all,
>
> I have 5 cubes next to each other and I wan to set the center of the
> stage as a pivot point for rotating them around the screen. is this
> possible?
>
> oldschool way I can use this formula
> var x:Number = r*Math.cos(theta)
> var y:Number = r*Math.sin(theta)
>
> with r being the amplitude and theta as my points along the circle
> axis as my way. but I am not sure how to translate this to a pivot
> point. I would appreciate any advice!
>
>
>
> She said what? About who? Shameful celebrity quotes on Search Star!
>
>
> From: ilteris kaplan <ilteriskaplan at gmail.com>
> Date: February 26, 2008 10:06:10 AM PST
> To: papervision3d at osflash.org
> Subject: Re: [Papervision3D] setting pivot point for circular rotation
> Reply-To: papervision3d at osflash.org
>
>
> hey andrew, thanksfor the answer. I need to be able to control the
> cubes in the future, like making one cube translate without
> affecting the rest of cubes :( that's like a big restrict for me.
>
> I solved it in a very crude way liek below, but as we can see it's
> not extendable. ( I need to create2 7cubes in different axises..)
>
> theta -= .005;
>
> angle-=1;
>
> for (var i:Number = 0; i < cubeArray.length; i++) {
> var x:Number = 0*r*Math.cos(theta)
> var y:Number = 0*r*Math.sin(theta)
>
> var x1:Number = -1*r*Math.cos(theta)
> var y1:Number = -1*r*Math.sin(theta)
>
> var x2:Number = 1*r*Math.cos(theta)
> var y2:Number = 1*r*Math.sin(theta)
>
> cubeArray[0].x = x;
> cubeArray[0].y = y;
>
> cubeArray[1].x = x1;
> cubeArray[1].y = y1;
> cubeArray[2].x = x2;
> cubeArray[2].y = y2;
>
>
> cubeArray[i].rotationZ = angle/3.49
>
> }
>
> I would appreciate any formulas to control separate cubes! thanks all!
>
>
> On Feb 26, 2008, at 12:49 PM, Andrew Dinmore wrote:
>
>> Just add the cubes to a DisplayObjectContainer3D, set the cube
>> positions within it and rotate the that. Use a separate DOC3D for
>> each cube if they need to rotate separately.
>>
>>
>>
>> From: ilteriskaplan at gmail.com
>> To: papervision3d at osflash.org
>> Date: Tue, 26 Feb 2008 12:43:42 -0500
>> Subject: [Papervision3D] setting pivot point for circular rotation
>>
>> Hello all,
>>
>> I have 5 cubes next to each other and I wan to set the center of
>> the stage as a pivot point for rotating them around the screen. is
>> this possible?
>>
>> oldschool way I can use this formula
>> var x:Number = r*Math.cos(theta)
>> var y:Number = r*Math.sin(theta)
>>
>> with r being the amplitude and theta as my points along the circle
>> axis as my way. but I am not sure how to translate this to a pivot
>> point. I would appreciate any advice!
>>
>>
>>
>> She said what? About who? Shameful celebrity quotes on Search Star!
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>
>
> From: Benoit Beausejour <b at turbulent.ca>
> Date: February 26, 2008 10:46:11 AM PST
> To: Patrick Matte|BLITZ <PMatte at blitzagency.com>
> Cc: "papervision3d at osflash.org" <papervision3d at osflash.org>
> Subject: Re: [Papervision3D] Parametric shapes and morphing experiment
> Reply-To: b at turbulent.ca, papervision3d at osflash.org
>
>
> We're planning on using parametric shapes to generate terrain.
> Morphing will be used for visual effects, but it's really more eye
> candy for this demo :)
>
> thanks Patrick!
>
> -b
>
> Patrick Matte|BLITZ wrote:
>>
>> Great work ! How are you going to use this for your project ?
>>
>>
>> BLITZ | Patrick Matte310-551-0200x214
>>
>>
>> You can see it on our blog at:
>> http://agit8.turbulent.ca/bwp/2008/02/25/dynamic-shape-morphing-with-papervision-3d/
>
>
> --
>
> <logo_ico3.gif>
> Benoit Beauséjour
> http://www.turbulent.ca/
>
>
> _______________________________________________
> 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/20080226/d345b413/attachment-0001.html
More information about the Papervision3D
mailing list