Hi all,
I am instantiating object from a prefab containing some objects as child, and an interactive cloth as parent. When running the game, all instantiates properly (or so it seems), I can also find this object and attach other child to it without issues, although when moving this object at run time, the texture does not seem to follow. In the editor I can see the objects move, but not the texture.
Editing the prefab allows me to move everything easily in the editor.
Any ideas and what I may have missed?
Thanks!
The cloth object had an error value: The Attachment Tear Factor cannot be 0, even though the IDE lets you set the value to 0, and specifies zero as the lower limit. Since the erroneous value is not mentioned in the error, disabling the interactive cloth was a quick temporary solution. With the interactive cloth disabled, which the texture is attached to, the transform no longer affects the texture (but the texture still displays), only the child objects as they still have a transform.
Boo for me for wasting time on an issue I caused, and boo at the IDE for letting me do something I shouldn’t, and not be specific about the error raised.
This might help…I had a similar issue with interactive cloth appearing to detach run-time. The fix was to apply a little force to shake the cloth before moving:
myObject.AddForceAtPosition(new Vector3(1,1,1),new Vector3(0,0,0),2);