How to do behaviours in order not at once ?!
Hey everyone! Finally after doing a lot of search with no answers I finally decided to submit my first post. Apologies if this is in the wrong category.
Any way lets focus on the question. I am trying to design animated buttons so when they are pressed they wobble. I am not sure what the best approach is but by thinking to save disk I thought it would be better to code than have buttons animated as image. Have look at this video:
I am interested in the second button. I am thinking to code the button to interpolate in height and then width to get a similar effect. however the problem I am facing is that when the code is compiled and when I press the button it doesnt do height and width in order but rather it expands the height and width TOGETHER. what is the solution to get things done in a time order? (eg. expand the height first then when its done width)
Also what would be your approach to design such buttons?
Comments
put the width in a timer that says after x seconds where X is the time you have the height expanding
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Thanks Jon! it worked
now if i want to animate the button like the video I posted, that would require around 4 5 movements to get it look like that and thats loads of timers and changes. what would you do if you wanted to creat such effect?
@StormyStudio's button bouncing demo might be useful here:
http://forums.gamesalad.com/discussion/comment/462742/#Comment_462742
@S888RAM said:
I'd use a sine wave for the width and a cosine (offset by 90°) for the height - and then just ramp the extent of the distortion down over time (using interpolate).
Link: https://www.mediafire.com/?bin7bmsvsb8gyqz
. . .
Nice @socks !
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
you guys ROCK!