Jump to content
Search Community

3D rotation Problem

GrafixGames test
Moderator Tag

Recommended Posts

Hello,

 

I am having problem with rotationY in TweenNano

 

When i use these 2 codes I get the desired result

 

1)

tween = new TweenNano(sp, 0.5, { x:newX, ease:Strong.easeOut } );

   sp.rotationY = (newX - halfWidth) * 0.15;

 

2)

 tween = new TweenNano(sp, 0.5, { x:newX, ease:Strong.easeOut } );

   newRotY = (newX - halfWidth) * 0.15;
   tween2 = new Tween(sp, "rotationY", fl.transitions.easing.Strong.easeOut, sp.rotationY, newRotY, 0.5, true);

 

 

But when I use the TweenNano for Same. the rotationY is not accurate and it does not produce desired result

 

   tween = new TweenNano(sp, 0.5, { x:newX, ease:Strong.easeOut } );

   newRotY = (newX - halfWidth) * 0.15;
   tween2 = new TweenNano(sp, 0.5, { rotationY:newRotY, ease:Strong.easeOut } );

 

Does TweenNano computes the 3D rotation in some different way than that of flash's normal tween?

please help

Link to comment
Share on other sites

No, TweenNano doesn't calculate the rotation any different than Adobe's Tween class - it looks like you might just be running into an overwrite issue. Have you tried setting overwrite:false on your 2nd tween so that it doesn't overwrite the first one?

 

In v11, TweenNano's default overwrite was true. In v12, it is false.

 

If you're still having trouble, please post a very simple FLA that demonstrates the odd behavior so that we can publish on our end and see what's happening. I'm sure we can get it figured out with a little more info.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...