- Home /
Weird problem with moving an InteractiveCloth
I need a cloth to move position, such as a cape following the character for a simple example (although in my case it is different). What I did is attach a collider to it and move the collider's transform. The problem is that the cloth does not always follow and this is weird. I have noticed that when the cloth is physically moving (due to hanging movements example) it does get dragged, but if I try to move the cloth after it comes to rest (not moving), the collider moves on it's own without dragging the cloth with it.
The code to move the collider:
function FixedUpdate () {
transform.Translate(Vector3.up * Input.GetAxis("Vertical") * Time.deltaTime * 100);
transform.Translate(Vector3.right * Input.GetAxis("Horizontal") * Time.deltaTime * 100);
}
Can someone provide me with an example or suggestions?
Answer by xikky · Feb 19, 2013 at 07:43 AM
Finally solved. Add a rigidbody to attached collider.
THAN$$anonymous$$ YOU! it was driving me mad! By the way, you can attach a rigidbody component to the parent of the collider's object too.
I have tried but it says: "You don't have permission to do this action. Please Login as another user" O_O
That is because you need 15 karma points to be allowed to vote up. $$anonymous$$ore info here. Your thought is still appreciated :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613092924im_/https://answers.unity.com/themes/thub/images/avi.jpg)