12-08-2019, 10:03 AM
(11-08-2019, 08:14 AM)QoQoo1321 Wrote: Changing the scale of a 3d model with obiCloth applied causes the mesh to appear broken
Please tell me how to respond
UNITY2018.3.14f1
Code that does not cause problems:
Code:model = (GameObject)GameObject.Instantiate(modelPrefab, new Vector3(0.5f, 0f, 0f), Quaternion.Euler(0, 180f, 0));
https://www.dropbox.com/s/jnjh1rgrzf1lcj...1.PNG?dl=0
The code where the problem occurs:
Code:model = (GameObject)GameObject.Instantiate(modelPrefab, new Vector3(0.5f, 0f, 0f), Quaternion.Euler(0, 180f, 0));
model.transform.localScale = new Vector3(0.4f, 0.4f, 0.4f);
https://www.dropbox.com/s/g6fkx957fqk6eb...2.PNG?dl=0
Hi there,
You cannot change the scale of a cloth. Mathematically it does not make any sense to apply a rigid transform to a deformable object.
Either create your cloth mesh with correct scaling right from the start, or use local space simulation. In local space, you can scale the simulation space by scaling the solver. See:
http://obi.virtualmethodstudio.com/tutor...space.html