Creating smooth worm/snake physics

Hello, I’m currently creating a worm system and this is what I’m trying to achieve.


Game Link (Wormface!)
My attempt:

To achieve this effect, it’s pretty simple. I’m using rope constraints to connect each tail. However, it’s no where as smooth as the video shown, which also uses rope constraints.

Problems:

  1. Most importantly, the tails do not travel in a smooth line. As you can see in the first clip, the last tails moves where the last tail went off, creating almost something like a train. In my case, the tails get dragged along with the head and does not look as good.
  2. The worm occasionally flings (probably due to low density)

I’ve tried manipulating the velocity of the tails using heartbeat which in the end did not work. I also tried to using body movers like BodyForce, still couldn’t figure it out.

I used CustomPhysicalProperties in order to change the density and friction of the tails, which allows 100+ tails at once without any slowing down, but in turn the parts are very light and fling a lot. Any help is appreciated :pray:

Here is the .rbxl file of my attempt:
WormSystem.rbxl (48.5 KB)

Tail looks like this:
image
Place consists of:
image

Are you sure the first video uses RopeConstraints?
Your video seems to be more realistic, if you pull a rope on the ground the closest part of the rope will be pulled first, it won’t pull along the exact same line it was.

Looking closely at what your trying to achieve you can see that each part follows the path of the one in front. So save the front part’s CFrame in a queue and then loop through those saved CFrames on the ones behind it.

1 Like