It’s a little difficult to explain so I’ve attached an example to help illustrate. Basically, I’m building a 2D platformer and I’d like the user to be able to manipulate certain sections of the floor with their finger - I’d like them to be able to pull a part of it down and for it to spring back up again, how do I go about accomplishing this?
You’re going to need to have some kind of mesh deformation, either based on bones or something… the mesh will have to be procedurally generated each frame, otherwise you will need to make the platform out of multiple sections joined together with physics joints and rotational springiness.
Thank you for your response, Would you please elaborate the process of generating it procedurally in each frame and it is required for 2d sprite, And being the image as one we cannot use multiple joints between them, I cannot tear it apart in pieces. It has to a be a single image and looks like one.
Thank you for suggestion, After reading a lot I get the idea of generating mesh in realtime, but in all those articles they used Mesh renderer, while I will be working with sprite renderer.
Moreover the shape of the sprite is really complex making it very difficult to programmed in triangles, And I need the collider on the sprite as they change the shape, the collider over the object should also change accordingly, and then it should be under control of user drag means it should bend as the user drags it vertically[as shown in image], and then when the user left the touch it should bounce back and get its own position and shape.
So I am not really feeling how this all is possible using just procedural generation, Do you have anything on this ?
Thank you again for your help,