Jump to content
Search Community

TransformationAroundCenter rotate scale separately

saulgoodman test
Moderator Tag

Recommended Posts

Hi all,

 

Another very specific problem just looking for ideas, after being stuck on it for over a week.

 

I am using the TransformationAroundCenter plugin for all of my transformations, namely rotation and scaling. I also know that you can rotate and scale at the same time, as long as you issue them all in the same command.

 

However, i would like to know if there's a way to do these transformations separately? For example, rotate an object with duration of 10 seconds, and after 1 second after the rotation starts, start scaling.

 

Right now, this doesn't seem to be possible. I looked into the source code of TransformationAroundCenter and TransformationAroundPoint plugins, it seems they operate on transformation matrices, which would explain why those separate transformations would conflict with each other. 

 

Could there be any way around this (for example, implement a transformationAroundCenter plugin myself that does not involve transformation matrices?), or is this problem inherently insolvable?

 

Thank you :)

 

 

Link to comment
Share on other sites

Yes, you are correct. Since you would have 2 separate tweens trying to write the transform matrix there would in fact be a conflict. A possible solution may be to nest your Display Object inside a parent. Then you could scale the parent from the bottom and rotate the child around center (or some other point). 

 

As for writing your own transformAroundCenter plugin without the transform matrix, I haven't been able to think that through far enough to really know how that work. If you take a stab and have success, please let us know.

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...