i want to make snake Dragon model to follow the spline path

output
Here’s the new and improved version, which looks the same - except:

  • This snake has its root in the pelvis.
  • Some of the bones face forward, some face backwards
  • The bones are not equally spaced.

Made a few changes to the blueprint logic:

  • Biggest one: Now we go through the skeleton on BeginPlay, and calculate the positive or negative distance from each bone to the root. You’ll need a new float array variable of BoneDistances, as well as a new variable for RootBone that you fill in with the RootBone’s name.
    – The way I’m doing it here assumes the mesh will be initially placed looking down the X axis.
  • When positioning the snake, rather than using the array index to calculate the distance to place the bone, we just use it to index into the array of stored distance values.
  • Now that I’m treating the pelvis of the snake as the root, there’s a little extra code you have to do for when the spline wraps around - it’s the piece with the modulo (%) node.
1 Like