[Papervision3D] Using Tweener to rotate Z axis

Zeh Fernando zehfernando at zeh.com.br
Tue Nov 6 09:02:28 PST 2007


> Thanks for your help Zeh...
> That's what my theory told me too. However the problem is rotating 90
> degrees in one direction, say the Y-axis, and then rotating on the Z-axis.
> for some reason the Z and X axis are the same at this point.
> If you read previous posts I have explained the issue. But to put it simply
> the following two examples produce rotations on the same axis, when in
> "theory" they should not.
> 1:
> Tweener.addTween(myobj, {rotateY:90, time:1});
> Tweener.addTween(myobj, {rotateX:90, time:1});
> 2:
> Tweener.addTween(myobj, {rotateY:90, time:1});
> Tweener.addTween(myobj, {rotateZ:90, time:1});
> Thanks,
> Dustin

Oh yeah, I think I remember the issue now; it seems to me that rotation 
is tied to the parent axis, so one axis is dependent on the other unless 
you use yaw/pitch/roll.

There may be other solutions to this, and I've only done some quick 
tests, but I believe one quick (if slightly dirty) solution would be 
having the object inside other parent displayobjects. You would wrap the 
object, and then, instead of rotating the object, you would rotate each 
of the wrapper parents - one for each specific axis.

This does sound strange though, so I'd like to hear other options to see 
what we can do to remedy the situation as other people have approached 
me with the same problem.

Unless I'm missing something, a perfect solution would be the option to 
have the object axis tied to other scope (for example, the world, or the 
object itself), which would be more of a internal change to PV3D than 
anything.


Zeh



More information about the Papervision3D mailing list