Open hsandt opened 4 weeks ago
This depends on physics server and what settings you set. I'm sure there might be some settings to make it better. Right now it seems like you are making a long line? Try pin joint with softness, or for springjoint there is damping and stiffness. Playing with these gives some results(eg damping 1000000 stiffness 0.001, stiffness 1000000, damping 0.0001, etc try a lot of values, try different values. Not just from 0 to 20. I think it also depends on mass you use, distance between shapes etc). End of the day this plugin just creates rigidbodies and joints. Thats it. How the physics server handles that and what values you should out those are found trhough experimenting. Try if not to start from demo i provide and work your way from there.
Anyway, if u need help with this, more info should be provided. Maybe join the discord and talk there, or post more info here, eg how does softbody texture used look like, what size the texture has, what size the shapes have, what masses, etc. provide also a project zip archived to test this.
Thanks for making this plugin, I was trying to make a 2D cloth for a scarf for my character, following the tutorial to attach it to a moving character.
However, whatever parameters I use, it stretches a lot more than expect. I expected it to be a little elastic, but in this case it goes much too far when the character moves around.
I can reduce Softness (in pin point mode) to 10 but still, I get a long scarf:
and playing with other parameters and spring mode makes it even worse:
Is there a way to simply ensure the cloth never stretches more than, say, 5% of its original size, for reasonable character speeds?
I like the Asparagus in the GIF demo in the README, it doesn't stretch too much. But then again it's not attached to a character - plus for some reason I can't find the scene shown in the gif in the addon samples folder.
I've been looking at this other 3rd party solution: https://github.com/coffe789/Godot-2D-Cloth-and-Verlet-Physics-Simulator but it's quite hardcoded and so it seems harder for me to switch from a square cloth to a rectangle cloth like my scarf.
I may try to just use pin points and some custom physics bodies for now...