How can I made a 2d sprite deform when colliding with a 2d game object? It’s for creating a jump pad type of thing. It’s a mushroom sprite you can jump on. How can I do this? I want the mushroom sprite to squeeze as the player jumps on it and get back to normal shape in a natural way. Any help is appreciated.
if you have access to a photo editor (photoshop - paid / GIMP - free) then you can create multiple images for your mushroom being deformed and then do this as animation. you would probably be best creating a spritesheet for this method though and then animating from that. lots of info for spitesheets on line
Already thought of that, but just wanted to know if there was a better way to do it… To make it look more natural.
If all you’re looking for is a very simple 1 dimensional shrink, you can mess with the scale of the object. So for instance you could have the height decrease with each impact. As it will do is internally resize the sprite just like a photo editor would, so not sure that is what you’re looking for. If you’re looking for something more dynamic like bending or the like, you’d probably want to go with the sprite being broken up into pieces and messing with each piece as you need to achieve the effect.