How to create a snake-like animation with a skinned mesh

Hello!

I’m trying to create a skeleton where the bones move kinda like a snake. Basically, each bone is gonna follow the next. When using SkinnedMesh, moving the root bone moves the entire geometry. What I’m trying to do is have the root bone move only the base of the geometry just like the last bone moves the tip of the geometry.

In this example: three.js docs

the bone 4 only influences the top of the cylinder and the bone 0 influences the whole geometry as a block.
What I want is to have the movement of the bone propagate until the bone 0.

Is that possible?

Thanks!

That’s the nature of bones. A rotation in the root bone rotates all the bones attached to it. For a snake-like animation move the bones in a snake-like fashion:

Two years ago I made an animation of a worm, that has a snake-like motion (more or less). I have no time to explain the details now, but here is an online demo of the worm:

https://boytchev.github.io/etudes/threejs/psychedelic-tapeworm.html

image

Here is the source code on GitHub.

1 Like