Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Reset cloth from script?
#1
I need to be able to reset the cloth I have on a character (not skinned cloth in this case, but also will have that too) when an animation starts, or when the character is suddenly repositioned from script.  As it is now, a huge impulse is imparted and the cloth goes swinging around wildly in such situations.

How is this done?

David
Reply
#2
(07-02-2020, 11:41 PM)nsxdavid Wrote: I need to be able to reset the cloth I have on a character (not skinned cloth in this case, but also will have that too) when an animation starts, or when the character is suddenly repositioned from script.  As it is now, a huge impulse is imparted and the cloth goes swinging around wildly in such situations.

How is this done?

David

It depends on whether you want to reset the simulation, or simply prevent character repositioning to affect dynamics. I suspect you're after the latter. In that case, you can simply set the solver's inertia scales to zero, reposition the character, then set them to whatever they were in the next fixed update.

See world linear/angular inertia scales here:
http://obi.virtualmethodstudio.com/tutor...olver.html
Reply
#3
(10-02-2020, 10:49 AM)josemendez Wrote:
Quote:It depends on whether you want to reset the simulation, or simply prevent character repositioning to affect dynamics. I suspect you're after the latter. In that case, you can simply set the solver's inertia scales to zero, reposition the character, then set them to whatever they were in the next fixed update.

See world linear/angular inertia scales here:
http://obi.virtualmethodstudio.com/tutor...olver.html


I really want to set the simulation back to the initial state.  How do you do that?
Reply
#4
See this other thread, might be helpful:
http://obi.virtualmethodstudio.com/forum...p?tid=2044
Reply