Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add cloth and runtime
#3
Hi 

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  Triste
Reply


Messages In This Thread
Add cloth and runtime - by renderlux - 17-06-2020, 03:54 PM
RE: Add cloth and runtime - by josemendez - 17-06-2020, 05:07 PM
RE: Add cloth and runtime - by renderlux - 18-06-2020, 10:12 AM
RE: Add cloth and runtime - by josemendez - 18-06-2020, 10:14 AM
RE: Add cloth and runtime - by renderlux - 18-06-2020, 02:34 PM
RE: Add cloth and runtime - by josemendez - 18-06-2020, 03:40 PM