Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Reduce swinging of cloth
#1
Hi, I have created a piece of cloth with 2 points on its two top corners (left and right). The goal to grab the piece of cloth corners by both hands in VR (one left and other right) and use that cloth. 

I use static attachment with VR controller objects when any cloth corner is grabbed, but when any corner not grabbed i switch that corner to dynamic attachment because I want that corner to fall down due to gravity and depict natural cloth behaviour (and disconnect that controller and put attachment in kinematic so its not effect by gravity of cloth which is now using dynamic attachment) 

I have noticed one thing if I'm holding one corner of cloth (for example left corner with left controller) using static attachment, and other end of the cloth (right corner) is hanging down with dynamic attachment, that end swings even if i don't move my other left corner at top. Its like some ambient air is moving it back and forth. 

To summerize my cloth is moving back and forth like air is blowing it. I have check there is no ambient wind. How i can make it stay and move little? Increase mass or which settings i need to work so that it doesnt swing much
Reply
#2
(24-09-2024, 08:12 AM)vrtraining Wrote: I use static attachment with VR controller objects when any cloth corner is grabbed, but when any corner not grabbed i switch that corner to dynamic attachment because I want that corner to fall down due to gravity and depict natural cloth behaviour (and disconnect that controller and put attachment in kinematic so its not effect by gravity of cloth which is now using dynamic attachment)

Hi,

I'm not sure I understand your explanation: switching the attachment to dynamic will just enable two-way coupling (exchange of forces) between the cloth and the attached rigidbody, if any. Making the rigidbody kinematic will effectively revert to one-way coupling (the object will apply forces to the cloth, but any forces applied be the cloth on the object will be ignored by it) so it's basically the same as having a static attachment.

So making the attachment dynamic when you let go of the object sounds ok, however making the object kinematic so it's not affected by gravity doesn't make any sense to me. Why not just use a static attachment at all times?


(24-09-2024, 08:12 AM)vrtraining Wrote: I have noticed one thing if I'm holding one corner of cloth (for example left corner with left controller) using static attachment, and other end of the cloth (right corner) is hanging down with dynamic attachment, that end swings even if i don't move my other left corner at top. Its like some ambient air is moving it back and forth.

To me it sounds like the cloth is colliding against the attached object. This won't allow the cloth to settle, as it's trying to get itself out of the collider but it can't since it's attached to it. Since it can't be simultaneously inside and outside the collider, it will jitter constantly as it tries to free itself in vain. The solution is to use collision filtering to disable collisions between that corner of the cloth and the attached object, see "Attachments inside colliders" in the manual.

kind regards,
Reply