Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing the scale
#1
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));
[Image: jnjh1rgrzf1lcj...1.PNG?dl=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);
[Image: image2.PNG?dl=0]
https://www.dropbox.com/s/g6fkx957fqk6eb...2.PNG?dl=0
Reply
#2
(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));
[Image: jnjh1rgrzf1lcj...1.PNG?dl=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);
[Image: image2.PNG?dl=0]
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
Reply