23-10-2024, 09:58 AM
(This post was last modified: 23-10-2024, 10:01 AM by josemendez.)
(23-10-2024, 09:51 AM)aardworm Wrote: I have one more question out of the top of my head. Is there a way to make the liquid sticky and not the surface? I found that I can set the collider's surface to be sticky, which is great. But I have multiple kinds of liquid running off of a body. Meaning, I can't set the stickiness of the body but have to control it via the liquid's properties. Or maybe I'm missing something?
This works the same way it does in Unity's physics engine, and most existing physics engines: using collision materials.
You can set a collision materials for both colliders and fluid emitters. When fluid comes in contact with a collider, their respective materials will be merged to get a single set of collision parameters (friction, stickiness, etc). See:
http://obi.virtualmethodstudio.com/manua...rials.html
When a collider or fluid has no collision material, zero is assumed for all collision parameters: zero friction, zero stickiness, etc.
So answering your question of "making the liquid sticky and not the surface": just set a sticky collision material for the emitter instead of (or in addition to) the collider.
kind regards,