[WIP] 2D Cloth - cloth physics for Unity

Hi! I’m working on 2D Cloth - is an asset to provide cloth physics into the Unity environment.

Asset Store: 2D Cloth | Sprite Management | Unity Asset Store
WebGL Demo: Unity WebGL Player | 2D Cloth

Features:
:heavy_check_mark:User friendly editor
Setup a few parameters and enjoy beautiful cloth-physics effect
:heavy_check_mark:Supports any shape of cloth
Do you want to use sprites with transparent areas as cloth? Not a problem, asset supports it
:heavy_check_mark:High performance, mobile friendly
Works perfectly on mobile devices
:heavy_check_mark:Really easy to set up
Create GameObject, adjust the parameters and there you go!
:heavy_check_mark:Works on all platforms
:heavy_check_mark:Works with Universal Render Pipeline(LWRP)
:heavy_check_mark:Long Term Support
Be sure that you’ll get support for new unity versions and features
:heavy_check_mark:Full C# source code, example scene and documentation included

Video:

Please let me know what you think :slight_smile:

3 Likes

Hey I just bought your asset and I must say I’m impressed with the results. Thing is, I’m trying to make a 2D character cape with your asset. Is there a way to simulate wind? Thanks!

Hi! Thanks for a purchase!
I think the best solution - use Effectors: https://docs.unity3d.com/Manual/Effectors2D.html

Would this asset work well with low-res pixel art? Something like a one-pixel wide string?

Hi! Thanks for your question! In this case it looks like rope, but asset can provide cloth/hair simulation, so I’m afraid it won’t fit you.

I made a small animation:gif

greenyoungantbear

1 Like

can this cloth 2d move with player? using joints?

Yes, sure! If you attach to the player or any other object and move it, cloth will move accordingly :slight_smile:
Manual has mini-tutorial how to attach cloth to object

Hey, this looks really dope, thank you!
I have a question, can we add wind to it?

Hi! Thank you!
You can use ArreaEffector2D for wind simulation. Demo scene has a wind implementation, check this out: https://unitymedved.bitbucket.io/2DCloth/1.0.1/index.html

Damn that’s perfect, thanks !

1 Like

Hi would this work for a 2D basketball net?

Hi! Yes, manual contains a tutorial for creating a 2D basketball net

Hey, looks cool! :slight_smile:
Seems to be what I need but I can’t be sure, infos about the product are a bit scarce. I usually look at manuals or tutorials before deciding to buy a product, do you plan on releasing a tutorial or make the manual available freely ?

A few questions:

  • Can we make the collision not as extreme as in your demo ? Like having something passing by the cloth (like an arrow or a character running in front of it) and making it react just a bit because of the passing wind?
  • Can we manually set the attach point on the generated mesh ?
  • And finally is there a way to prevent the mesh from inter-colliding ? Sometimes in the demo after a strong collision the cloth is completely folded in on itself.

Thanks !

Hi! Thank you!

Sure, you can download Manual here.

  1. You can set some cloth joints as IsTrigger = true, but joints that has IsTrigger = false will have precise collisions. As an solution - you can try to set IsTrigger in chess order and use small joints radius - in this way it will work, but depends on shape/size of objects that will be thrown trough cloth
  2. Asset supports attaching to the left, right, top and bottom joints from Cloth2D component. You can also setup manually attached points as shown in Manual (Attaching Cloth2D to the object paragraph)
  3. Yes, using Project Settings → Physics 2D you can setup ignore collisions for some layer and choose that layer in component:

Screenshot

7036234--833977--upload_2021-4-13_22-59-31.png

7036234--833974--upload_2021-4-13_22-57-52.png

Let me know if you have any questions :slight_smile:

1 Like