Changing position of object containing InteractiveCloth

I have made simple flag prefab contained InteractiveCloth with some random acceleration. It works fine and looks great :slight_smile:

When some player picking up flag I changing position of flag transform with Update. And this still works well and looks great :slight_smile:

When I bring flag to touchdown point, I need to make score and return flag to its start position. BUT, when I changing its position (far from current pos), flag is stretching terrible long like a rubber from current position to start position (attached colliders) and some time just dangles. Sometime clings for some geometry and remaining in this state forever.

How i can make something like teleport of object, without this stretching? I have try every option on InteractiveCloth and can’t made anything satisfy me. Only big Thickness prevent this, but looks like plane without any cloth process.


I had this exact problem - change the InteractiveCloth.density value and the simulation will reset.

My fix for it is kind of a hack (and also resets a collection of objects with interactive cloth), but it should work for you:

void ResetCloth(GameObject obj)
		float d;
		InteractiveCloth[] enemies = obj.GetComponentsInChildren<InteractiveCloth>();
		foreach(InteractiveCloth cloth in enemies)
			d = cloth.density;
			cloth.density = 2;
			cloth.density = d;