Search Unity

Creating interactive slime touch on screen

Discussion in 'General Discussion' started by Ethwood, Sep 7, 2018.

  1. Ethwood

    Ethwood

    Joined:
    Nov 6, 2016
    Posts:
    39
    I've been pulling my hair out on a perfect solution for this. I've been trying to learn liquid physics but couldn't quite get it right.

    Basically there's a game called Slime Simulator where you can interact with the slime using your finger and it creates "Holes" or Ripples in the slime in a very realistic way according to how you touch the screen. After a few seconds, the holes you make dissappear and the slime reforms back to original shape. Different kinds of slimes have different speeds of reformation.

    From what it looked like, I could still spot glitches in the manipulation of quads when I was twisting the slime around, which confirmed that the slime is indeed a mesh being deformed and not just screen effects. The mesh seems to be "pushed down" - creating a hole if I just tap on the slime.

    So far I've tried Catlikecoding's tutorial and could achieve simple mesh deformation this way.

    Whereas I'm actually looking for something like this (GIF recorded from aforementioned game).

    I know I'm close to this. Problem is, the tutorial's solution uses the mouse pointer's raycast as point of max force, attenuating downward force to nearby vertices uniformly.

    But in the mentioned game, a finger shape is shown as user presses on the screen. Also, the attenuation to nearby deformation is pretty sharp, just like real slime.

    What's the best way to approach this? Should I look at liquid physics assets? Or should I look at mesh deformation?
     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Have you looked into vector fields as this is probably the underlying simulation system...

     
  3. Ethwood

    Ethwood

    Joined:
    Nov 6, 2016
    Posts:
    39
    Thanks for the reference!

    I've actually just purchased an asset called Obi Cloth. It has softbody support and the developer said I can recreate a slime using a softbody cloth object. But unsure as to how to go about it.
     
  4. may1st

    may1st

    Joined:
    Jan 17, 2018
    Posts:
    5
    Hello,Have you finished The Game,Cound you tell me how you did that?