• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED HOW TO ADD SQUASH AND STRETCH?

HuntExe

Member
I've been trying to implement squash and stretch to my character and platform that he walks on for a while now but I'm lost. I'm referring to something through code like image_xscale/image_yscale not inside of an animation.
 

Slyddar

Member
Idealy you'll want to have an xscale and yscale variable which you'll lerp to 1 in the step event. Have a scale_max and scale_min value, which should be somewhere between 0.7 and 1.3 When you jump set xscale to min and yscale to max, when you land set xscale to max and yscale to min. Add draw_sprite_ext to the draw event and use the scale variables in the image_xscale and image_yscale arguments.
Lastly ensure the origin is bottom middle of the sprite. If you do all that right, it should work fine.
 
Top