how create cloth physics in construct 3

2 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • i didn't understand how you would like to do it

  • dropbox link does not work. Maybe you say how to make them move but they already move well physically. I would like to make the fabric of different heavier thin light materials and every time how they deform it should change for example for the fabric of the sweaters it should deform less or more slowly

  • here this is exactly what the link had when you opened it "I was kinda bored and playing the game hammer fight led me into wanting to make a physics-based 2d cloth/banner wtv.

    well, id says that I succeeded. although the collisions need a bit of work because physics has no "point" based collision (feature request) the cloth just collides 6 pixels away from what it's actually hitting (it's a 13x13 circle)

    the cap is made in 98.9 so I'm unsure how well it might work in newer versions. I bundled an exe just in case.

    mouse controls the cloth "pin"

    holding space shows the nodes and springs.

    oh, yeah I went a Lil overboard trying to make it bloom-ish with layer effects so you might wanna take those out if it's slowing things down. I think it would look excellent for curtains blowing in from an open window during a sunburst afternoon, or a cape for some character, feel free to use it

  • s.http://files.getdropbox.com/u/1010927/Cloth.zip

  • that link was not a dropbox btw

  • there is a effect that distorts stuff in different ways you can maybe try that

  • Pardon the late reply. It’s been a long week.

    The action that sets the y position has as I recall a +200*dt*dt at the end of it. The 200 is the gravity and you can change that to whatever you want.

    Changing it isn’t really the way to do different materials. The algo I used is basically only one type of cloth. It could be made stiffer by doing more iterations of constraining the points together or adding diagonal constraints too.

    There may be other algo with more tuning parameters.

  • R0J0hound thank you very much don't worry I understand you, I too have been very busy these days. I've already tried to change the gravity value and I don't really like the result. could you give an example by adding more interactions please

  • hello R0J0hound sorry for the trouble but how do I shrink the grid to distort but always leaving it 10x10

  • Here is a more generic version.

    1. Place the cloth sprites wherever you want some cloth. It supports multiple instances.

    2. change the instance variables of the cloth sprite to change up the settings.

    a. resX, resY is the size of the grid that you want to simulate. bigger sizes are slower.

    b. diagonals turns on diagonal constraints. Makes cloth a bit stiffer.

    c. iterations will make the cloth less stretchy the higher it is. 1 is the default and fastest. More than 10 would be very stiff but very slow.

    dropbox.com/s/cl1205kk9cwjh3c/verlet_cloth_paster2.capx

  • R0J0hound thank you very much you are the best

  • R0J0hound thanks again for the recent file but I have some problems I would like to make it that when I bring the sprite p to another sprite p it anchors to that and if I move it the other remains anchored.

    Another problem is that I would need to adjust the z order between the textures drawn in the paster please can you do it

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • sorry again but I have another problem I have to do that all sprite p collide with collider box for example I want to put between two p sprite sprite among them with whom they will have a collision

  • I don’t have time to work on such a thing. Seems like the kind of thing independent of the cloth sim. I mean in something from scratch can you attach a sprite to another sprite?

    Also the zorder is completely subjective with this cloth sim. Make it 3D and there would be an order but I’m taking a step away from this for a while.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)