![]() |
Attachments Not Working - Disable/Renable? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: General (https://obi.virtualmethodstudio.com/forum/forum-5.html) +--- Thread: Attachments Not Working - Disable/Renable? (/thread-4484.html) |
Attachments Not Working - Disable/Renable? - scoull - 27-04-2025 Hi All, thanks in advance for taking a look. I am working with attachments for the first time using Obi Fluid. I am able to create the attachment with a proper target and particle group, but when adding particles to the particle group, nothing happens. Additionally, if I try to disable/reenable the attachment at runtime (which I don't even think is necessary if I'm just adding/removing particles), then unity crashes and gives the GPU error "Failed to present D3D11 swapchain due to device reset/removed". I am using compute backend. Code: void Solver_OnCollision (ObiSolver solver, ObiNativeContactList contacts){ RE: Attachments Not Working - Disable/Renable? - josemendez - 27-04-2025 (27-04-2025, 09:44 PM)scoull Wrote: Hi All, thanks in advance for taking a look. Hi, Attachments aren’t designed to work with fluid. The reason is that giving infinite mass (which is how static attachments work) to a fluid particle also makes it infinitely dense. May I ask what your use case is? Kind regards, RE: Attachments Not Working - Disable/Renable? - scoull - 27-04-2025 (27-04-2025, 10:24 PM)josemendez Wrote: Hi,Hi Jose, Thanks for the quick reply. I am working on a game where you put sauce onto objects, so I want to be able to freeze particles once they reach the object so that they don't move until killed. I already have a solution working for this using a modification of your sleepthreshold code, freezing the particles in solver space, but this means I have to move the solver around along with the frozen particles, thus I can only have sauce frozen to one moving object at a time. Edited to say: Issue is solved as attachments are not designed for fluids. My existing solutions works fine. |