[Papervision3D] Rotating a Collada Object (TweenMax)

Javier España | javierespana.com info at javierespana.com
Mon Jul 13 13:36:01 PDT 2009


Perfect! Thanks... It seems I was not creating the DO3D the correct way...

On Mon, Jul 13, 2009 at 4:50 PM, Steve D <kruass at gmail.com> wrote:

> Place your model inside of an empty DisplayObject3D, position the model so
> that the origin (0,0,0) of the DO3D is located at your desired pivot point,
> then do your spatial manipulations to the container DO3D.
>
> Example:
>
> container:DisplayObject3D = new DisplayObject3D();
> container.addChild(collada);
> collada.y = -50; // set your pivot point
>
> now treat your container object as the pivot point.  This is the most
> common, simple solution, although it requires you to remember that your
> top-level object is no longer the collada, but a container.
>
>
> The alternative solution is to change the coordinates of every vertex after
> loading the model to offset them by the desired amount.
>
>
>
>
> 2009/7/13 Javier España | javierespana.com <info at javierespana.com>
>
>> Well, up to the next problem... It seems my object's pivot point is wrong,
>> I double checked it on 3Ds Max and it's good, but for some reason when
>> exporting it as a collada model, it's not centered...
>>
>> This makes my rotations to move the entire object instead of rotating it
>> keeping the center of it in place... Here's the example:
>>
>> http://www.javierespana.com/uploads/plano_collada.swf
>>
>> I read about creating a new DisplayObject3D, adding the collada model as a
>> child of it, and then adding the DisplayObject3D to the scene...
>>
>> This works fine, but the rotationX isn't working at all, any ideas?
>>
>> Thanks,
>>
>> Javier
>>
>> 2009/7/13 Javier España | javierespana.com <info at javierespana.com>
>>
>> Thanks a lot, I missed that =)
>>>
>>>
>>> On Mon, Jul 13, 2009 at 11:06 AM, Ross Sclafani <ross.sclafani at gmail.com
>>> > wrote:
>>>
>>>> i would assume you have to target rotationY or rotationX, or rotationZ..
>>>> 3d objects do not have a "rotation" property....
>>>> _r
>>>>
>>>> On Jul 13, 2009, at 9:47 AM, Javier España | javierespana.com wrote:
>>>>
>>>>  Hi there guys,
>>>>>
>>>>> I've managed to load and interact with a Collada object called
>>>>> "collada" in my scene. The thing is that I added a mouse listener so when a
>>>>> user clicks on the collada object something happens.
>>>>>
>>>>> If I do this: collada.x += 20;
>>>>>
>>>>> All works great, but it doesn't work when I do this:
>>>>> TweenMax.to(collada, 1, {shortRotation:{rotation:270}}); or any other
>>>>> TweenMax rotation...
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Javier
>>>>> _______________________________________________
>>>>> 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/20090713/50de0d76/attachment-0001.html>


More information about the Papervision3D mailing list