Growing actor question.
CaptFinn
Member Posts: 1,828
OK how do i ask this?
Ill paint the picture so bests to explain my question.
Device: ipad portrait. 768x1024
Actor: white default
Actor Size: 700 wide x 100 high
Actor Position on screen: x=384 / y= 914
I want to "animate" the actor growing in length from top of screen toward bottom of screen. But I only want the actor to grow from the bottom down. I want the top edge and sides to stay where they are. only the bottom of the actor grows downward.
Best thing I can do to describe it is a dropdown menu. Im racking my brain. I just cant see it.
Comments
You'll need two Interpolate behaviors.
One that will interpolate the height of the actor to 964.
And another that will interpolate the Y position of the actor to 482.
If you were going from the very top of the screen, you would need the actor to stretch the full 1024 pixels, and the Y position would move to 512.
However, your actor is 60 pixels from the top edge, so: 1024 - 60 = 964.
And because the registration point of the actor is in the center, subtract 30 from 512 to get the 482.
Stretching blank actors looks fine, but doing that with an actual image will look pretty bad. In that case, you'll need to implement something like "9-slice scaling" where you slice up the image. The bottom slice would simply slide into position, whereas the center slice would do the stretching. That way you can have rounded edges on the bottom of the dropdown menu and preserve the integrity of the image.
Anyway, hope this helps!
Joe
I think the issue was I wasnt making the durations the same.
Yes, that is key.