How can I make snake type movement?

I am making a rig that has multiple body parts like a caterpillar (pj pug a pillar from poppy playtime chapter 2). However when he moves I want to make it so he moves like a caterpillar. So it would be a chain movement type of thing. Similar to the classic “snake” game.

I don’t know where to start or how I would go about it. The only thing I know is that I have to script the chain effect it cannot be a custom made animation.

Can someone help me out? Thanks!

3 Likes

im sorry if my post may seem kind of confusing this is my first devfourm post.

try using a rope constraint connected to each part.

I messed with rope constraints but it doesnt seem to work well at all. Any other ideas?

Can anyone help? I still can’t figure it out.

Can you send me the model?

Extracharactersahhh

This is for a commission so idk if im allowed to leak the model. But basically the rig is just a model with a Head, humanoid root part. And another model inside called “Tails+Torso” that has all the Joints or body parts whatever you call it. Its numbered from Tail1-Tail10 and has a Torso (start of tail) and TailEnd.

Ive tried messing with every constraint and still nothing worked that well. I’ve even tried inverse kinematics which I think would be my best bet but i cant figure out how to do it flawlessly.

Not entirely sure but you could try something with inverse kinematics, it might work but it would be hard to get the movements right

its been an incredibly difficult process with almost 0 improvement in days im starting to question if this commission is even worth it.

Is it supposed to be able to move anywhere and would it need to make sharp turns?

Seems like animation would be a good choice.

Probably the most elementary solution is to make each segment move towards the next segment’s position the same distance the front segment travels each frame. Make sure you iterate in order from the front to back when you do this. If this doesn’t work I can suggest other solutions

Do you have discord? Add me on discord (sockeria) and send me the model, I wont leak it

I’m not good with physics-based movement but couldn’t you use say a sin wave or something based off the HRP?