How to get Actor bigger then smaller then bigger than small non stop?
Brand0n1210
Member Posts: 12
How can I do this? An example would be the play button on ninjump. Thanks in advanced!
Comments
Constrain height to AAA*sin(game.time*BBB)+CCC
AAA is how much you want the object to grow and shrink in size.
BBB is how fast you want the change in size to happen.
CCC is what you want the default size of your actor to be.
So a 100x100 actor that grows to 120 and the shrinks to 80 would be:
Constrain width to 20*sin(game.time*123)+100
Constrain height to 20*sin(game.time*123)+100
(the '123' speed value here is whatever you want it to be)
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
If that is the effect you want, then go for it.
If you want a square that pulsates like it grows in all directions, then just use either sine or cosine. Not both.
[I'll edit my post above]