- Home /
Change shape of object upon collision
I'm new to Unity and I'm trying to change the shape of an object upon collision with other objects. Basically the player controls a blob, and as the blob collides with other blobs the shape of the blobs will change, reacting to the impact of the other blob. The small blob will become absorbed by the bigger blob that the player controls.
The best analogies I can think of are two water drops converging in zero gravity, or the way two blobs in a lava lamp squish and converge into each other.
I'm designing the game in 2d however I can switch to 3d if it would yield the result I'm looking for. I only have code written for character movement right now, but I'm stuck on how to start with this idea, and what Unity components to access. Thanks in advance!
Answer by Epic_PotatoGuy · Jul 09, 2018 at 08:59 PM
I'm not sure how to do that perfectly, but it may help to have it so when it collides the little guy disappears and the big guy expands by the size of the little guy or another amount (might not be what youre looking for but oh well)
I know how to destroy the smaller object upon collision, and I know how to simply increase the size of the player blob, however I'm not sure how to do this as elegantly as I'm attempting to. I'm assu$$anonymous$$g it has something to do with editing the mesh or maybe a physics component. I've been reading about cloth in unity, and soft body components but I haven't found anything in the right direction of what I'm trying to do yet.