How to implement a flowing scarf-like-object?

Hi, I’m new to posting on these forums, but have lurked for a while :o .

I have a character that has a long, flowing scarf type of garment that I’d like to have flow behind him, in such a way as the main character in the Shinobi game for the PS2 released about 8 years ago.

My approach was to have the scarf (rather, it’s excess) as a separate object, parented to a joint in the character. The scarf itself is a skinned mesh whose skeleton consists simply of a chain of joints. I figured that I could treat the scarf as something of a chain, and use hinge joints to connect the mesh’s joints together, but this is proving unsuccessful.

I was wondering if anyone has tried to do this before, or if anyone might be able to give me a direction to try and get this working?

Any help would be greatly appreciated :smile:

if it is not too complex, the softbody physics script on the unifycommunity might be of use.

A bit of an update: I’ve gotten the cloth/scarf excess to follow kind of lazily about. But the base (where this cloth is supposed to attach to the character), kind of lags behind the character.

Here’s a link to the video of my progress, although Youtube seems to have killed the quality =/

I did a little poking around with this, but it’s not really what I need, thank you for the quick reply though :smile: .

How did you end up to get the scarf to flow like that if the joints didn’t work?

I actually ended up using character joints to link the “segments” of the cloth together. But regardless of what joint I used to attach the cloth to the character’s head, it kept stretching like crazy.

Right now I decided to take the same approach, but using a line renderer, and a script that sets the points for the line to match the “chain” I need. The base point being where I need it to attach to my character’s head.

Can’t help but wanted to say it looks pretty impressive.

I haven’t worked with joints in combination with rigidbodies in a while, but IIRC the stretching can be minimized by reducing the weight/mass of the attached segments and increasing the spring value of the joint. Another option to try is a configurable joint instead of a character joint. Hope this helps.