Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  colliders for obi cloth
#1
Would you tell me how to set up collision in the latest version of obi cloth? I want you to make video for that.
Reply
#2
(29-01-2019, 03:16 PM)Richard Wrote: Would you tell me how to set up collision in the latest version of obi cloth? I want you to make video for that.

Hi,

Simply add an ObiCollider component to any existing collider (ObiCollider2D if using a 2D collider). That's it. Sonrisa
Reply
#3
(29-01-2019, 03:28 PM)josemendez Wrote: Hi,

Simply add an ObiCollider component to any existing collider (ObiCollider2D if using a 2D collider). That's it. Sonrisa

I just added that. What does the plane collide with? It does not seem to work appropriately.
Reply
#4
(30-01-2019, 12:57 AM)Richard Wrote: I just added that. What does the plane collide with? It does not seem to work appropriately.

"Simply add an ObiCollider component to any existing collider". You added it to the cloth itself. You must add it to the plane, and it must be a separate object.
Reply
#5
(30-01-2019, 08:19 AM)josemendez Wrote: "Simply add an ObiCollider component to any existing collider". You added it to the cloth itself. You must add it to the plane, and it must be a separate object.

An error happens. "The variable sharedMesh of ObiCloth has not been assigned. You probably need to assign the sharedMesh variable of the ObiCloth script in the inspector." ,but I cannot find out "sharedMesh", and the plane still is weird shape without any object to collide.
Reply
#6
(30-01-2019, 09:13 AM)Richard Wrote: An error happens. "The variable sharedMesh of ObiCloth has not been assigned. You probably need to assign the sharedMesh variable of the ObiCloth script in the inspector." ,but I cannot find out "sharedMesh", and the plane still is weird shape without any object to collide.

Hi there,

The collider and the cloth must be different objects. You add a ObiCollider component to the collider (the thing you want the cloth to collide with), and a ObiCloth component to the cloth (the deformable mesh). The cloth itself does not need to have any collider component on it for collisions to work.

Here, I recorded a video for you, where I set up a cloth from scratch then create a plane for it to collide with Sonrisa:
Reply