27-04-2022, 04:08 PM
(27-04-2022, 03:49 PM)charlotte Wrote: Im actually creating the solver and cloth through scripting, not from editor. How can i add that new solver to affected solvers list of the wind?
You can do it like this:
Code:
ambientForceZone.enabled = false;
ambientForceZone.affectedSolvers = new ObiSolver[]{yourSolvers};
ambientForceZone.enabled = true;
Note it is necessary to disable/then reenable the force zone because the list of solvers is only updated in OnEnable().
kind regards,