Obi Official Forum
Bug / Crash Weird movement of obi cloth - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Bug / Crash Weird movement of obi cloth (/thread-921.html)



Weird movement of obi cloth - Richard - 21-02-2019

Hello. I attached obi cloth to the dress. It starts rotating at runtime like the image(left one is original) and shrink even though I did not do such setting. Can you solve the problem?


RE: Weird movement of obi cloth - josemendez - 21-02-2019

(21-02-2019, 10:01 AM)Richard Wrote: Hello. I attached obi cloth to the dress. It starts rotating at runtime like the image(left one is original) and shrink even though I did not do such setting. Can you solve the problem?

Hi,

This is most like a scaling issue with the mesh itself. Make sure the mesh transform's scale (and all parent transforms up its hierarchy) have unity scale (1,1,1).


RE: Weird movement of obi cloth - Richard - 21-02-2019

(21-02-2019, 10:08 AM)josemendez Wrote: Hi,

This is most like a scaling issue with the mesh itself. Make sure the mesh transform's scale (and all parent transforms up its hierarchy) have unity scale (1,1,1).

When I try to change its scale by transform.localScale, it does not work. Why? or I am doing a wrong way?


RE: Weird movement of obi cloth - josemendez - 21-02-2019

(21-02-2019, 11:38 AM)Richard Wrote: When I try to change its scale by transform.localScale, it does not work. Why? or I am doing a wrong way?

Hi,

You should not change it inside Unity, you must change it in the modeling package you used to create the mesh.

Make sure you apply any transformation to the mesh vertices themselves, this is done in different ways depending on what program you use. In Blender for instance, it is Object->Apply->Scale.

http://builder.openhmd.net/blender-hmd-viewport-temp/editors/3dview/object/editing/transform/clear_apply.html


RE: Weird movement of obi cloth - Richard - 21-02-2019

(21-02-2019, 01:23 PM)josemendez Wrote: Hi,

You should not change it inside Unity, you must change it in the modeling package you used to create the mesh.

Make sure you apply any transformation to the mesh vertices themselves, this is done in different ways depending on what program you use. In Blender for instance, it is Object->Apply->Scale.

http://builder.openhmd.net/blender-hmd-viewport-temp/editors/3dview/object/editing/transform/clear_apply.html

Hello.

If I want to shrink cloth, what can I do? And can I select particles like around shoulders or arms?


RE: Weird movement of obi cloth - josemendez - 21-02-2019

(21-02-2019, 01:40 PM)Richard Wrote: Hello.

If I want to shrink cloth, what can I do? And can I select particles like around shoulders or arms?

Use local space simulation. That would allow you to scale the cloth simulation arbitrarily:
http://obi.virtualmethodstudio.com/tutorials/localspace.html

To select particles near a given zone at runtime, either use trigger colliders:
http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html

or just calculate the particle distance to a given point and then select those close enough. The last example in the page does pretty much this.
http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html


RE: Weird movement of obi cloth - Richard - 21-02-2019

(21-02-2019, 02:39 PM)josemendez Wrote: Use local space simulation. That would allow you to scale the cloth simulation arbitrarily:
http://obi.virtualmethodstudio.com/tutorials/localspace.html

To select particles near a given zone at runtime, either use trigger colliders:
http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html

or just calculate the particle distance to a given point and then select those close enough. The last example in the page does pretty much this.
http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html

Thank you