Snake movement via manipulating bones

Hey!

This is most likely a question for more advanced programmers but if you feel you have a viable solution to this feel free to respond!

I’m currently attempting to create a Snake in Roblox using bones! I’ve attempted this from several different angles and found that a sort of “Inverse Kinematics” approach would be the most effective solution for this, however I’m having some issues actually applying this to my Snake rig.

My first attempt was just using parts to create the desired snake effect:


Place file for above:
Snake.rbxl (23.3 KB)

As you can see this worked great, using a very basic method of looping through the created segments (which would be bones in the skinned mesh rig) and setting the CF of the segment using CFrame.new(lastSegmentPos, currentSegmentPos)

However going from here I’m pretty stuck on what to do. I’ve tried applying this to my skinned mesh rig with little success
SnakeSkinnedMesh.rbxm (6.7 KB)

I don’t have much experience with rigging (as this one rigged for me) or skinned meshs’ so I have nothing to go off from here, if you can provide any sense of help/direction for this problem please post below!

Thanks!

Edit:
Here is the FBX file of the snake if the problem is that it’s been rigged incorrectly Snake.fbx (150.3 KB)

4 Likes

You can use the bones world CFrame or more preferable object space CFrame based on the results like @arlthmetic has done.

3 Likes

Thanks for that :smiley: I’ll give this a go now using FABRIK, should be fun!

Any updates I get I’ll post here

1 Like

@Wonuf

Hey man sorry for the bump but I’m trying to do the same thing. In fact, I’ve been trying to do it for a couple of weeks now… Were you able to find any success in using IK for bones?