18-06-2020, 10:12 AM
Hi
This looks like it works (no errors)
and I create Solver in Start()
But the physics don't work
This looks like it works (no errors)
Code:
myMesh.AddComponent<ObiSkinnedCloth>();
ObiSkinnedCloth cloth = myMesh.GetComponent<ObiSkinnedCloth>();
cloth.skinnedClothBlueprint = ScriptableObject.Instantiate(sourceTop);
and I create Solver in Start()
Code:
GameObject solverObject = new GameObject("solver", typeof(ObiSolver), typeof(ObiFixedUpdater));
ObiSolver solver = solverObject.GetComponent<ObiSolver>();
ObiFixedUpdater updater = solverObject.GetComponent<ObiFixedUpdater>();
updater.solvers.Add(solver);
But the physics don't work