Interpolate constrained actors
Roderic
Member Posts: 145
I can interpolate, and I can constrain... But, when I have 2 actors constrained together, and have them move across the screen, I want to interpolate their size so the effect is that of going off into the distance. I can interpolate their size smaller, but when I do, they become disconnected. The constrain is still working, but as the two images get smaller, they appear to drift apart from each other.
Is there a way to keep them connected and interpolate their size at the same time? I'm guessing that I would have to change the offset of the constrain as they get smaller, but how to do that, I'm not sure. Any suggestions?
Thanks!
Is there a way to keep them connected and interpolate their size at the same time? I'm guessing that I would have to change the offset of the constrain as they get smaller, but how to do that, I'm not sure. Any suggestions?
Thanks!
Comments
___________________________________________________________________________________
TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
Leave the interpolate as it is, then:
constrain self.pos.x -> otheractor+(self.pos.x - otheractor) / 2
Basically it sets the position of the other actor to be halfway between the self actors middle point, so as it gets bigger or smaller one end will stay in the middle. You might have to play around with it a bit to get it working foryour particular game, I only needed it to work on the y axis for my game so I haven't tested it with both x and y axis.