09-09-2018, 11:32 AM
(This post was last modified: 09-09-2018, 02:36 PM by josemendez.)
(09-09-2018, 06:06 AM)arrnav96 Wrote: Hi, thanks for the reply. Just purchased Obi cloth.
I'm trying to create a slime simulation game. This is the reference game. Have a few questions regarding the same:
1. Can a soft body cloth surface I make react to user's finger touch as shown in reference? If so, can it create a "hole" in the shape of a finger when pressed on?
2. Also, does the cloth surface allow mixing of colours on runtime? The reference game I showed also has a feature where a colour can be gradually mixed onto the slime using user's finger.
3. How do I turn gravity off for the cloth? I want it to react to touches and behave like a slimy fluid, without falling down due to gravity. (As if the cloth is actually a slime fluid kept in a bowl) I read the manual but didn't get a clear picture.
1.- Yes, it is up to you to implement such system. You have access to particle positions/velocities, you should simply modify them when the user presses the screen. Use Unity's input system to achieve this, in conjunction with Obi's particle getters/setters:
http://obi.virtualmethodstudio.com/tutor...icles.html
2.- This has nothing to do with the physics engine/cloth simulator, as it is some sort of "paint" mode. It is completely up to you to implement this. The cloth mesh is a regular Unity mesh, to achieve this you could use per vertex colors, or textures combined with a custom shader.
3.- Simply reduce the solver's "gravity" to zero. See:
http://obi.virtualmethodstudio.com/tutor...olver.html