Hi, I've been using Obi Fluid since many month now, it's an awesome asset and I love it.
Recently, I started a project and I attempt to build an environment in Unity to do Offline Rendering to animate sequences.
For the scenes with fluids, I found that the Obi Fluid solution is absolutly perfect.
I've succedded in making a really simple script to bake a mesh collider that updates every frames.
here's the result. (the model is from Rascal asset but there's absolutly no connection with the current problem)
As you can see, the Obi collider component attached to the object with the Mesh Collider does not updates the collisions with the fluid.
Is there any way I should be able to make it consider the updated mesh ?
(Keep in mind it's for an Offline solution, so computation time is not really an issue here)
thanks !
[EDIT]
I finally found a quick solution wich give this result :
https://imgur.com/a/tH66fwz
To do this, I simply modified the Obi Collider script, including an Update() function wich contained two things :
- Getting the Mesh Collider component mesh
- Setting it as the current Source Collider.
Last question : it is possible to get informations when a particle collide on a surface ?
Like to trigger an action (I would like to apply a decal to the collided object to simulate a wet surface)
Recently, I started a project and I attempt to build an environment in Unity to do Offline Rendering to animate sequences.
For the scenes with fluids, I found that the Obi Fluid solution is absolutly perfect.
I've succedded in making a really simple script to bake a mesh collider that updates every frames.
Code:
Mesh colliderMesh = new Mesh();
meshRenderer.BakeMesh(colliderMesh);
Mcollider.sharedMesh = null;
Mcollider.sharedMesh = colliderMesh;
here's the result. (the model is from Rascal asset but there's absolutly no connection with the current problem)
As you can see, the Obi collider component attached to the object with the Mesh Collider does not updates the collisions with the fluid.
Is there any way I should be able to make it consider the updated mesh ?
(Keep in mind it's for an Offline solution, so computation time is not really an issue here)
thanks !
[EDIT]
I finally found a quick solution wich give this result :
https://imgur.com/a/tH66fwz
To do this, I simply modified the Obi Collider script, including an Update() function wich contained two things :
- Getting the Mesh Collider component mesh
- Setting it as the current Source Collider.
Last question : it is possible to get informations when a particle collide on a surface ?
Like to trigger an action (I would like to apply a decal to the collided object to simulate a wet surface)