How to make a skeletal mesh follow the spline?

Is there any way to make a skeletal mesh follow the spline I created?

It’s a snake

Yep :blush:

You can get the Find Location Closest to World Location node, plug a reference of the spline into it’s Target pin, and have the coordinate space as World. Then use the Return Value to constantly set the location of your actor. To trigger that continuously, you can place the Set Actor Location node either after Event Tick (and if you want you can use a Gate node to control the execution flow), after a custom event that’s binded to a looping timer or after the Update pin of a timeline. Now your actor should be constrained to the spline!

Once those are all set, you can then use an Add Movement Input node and insert your desired direction into it’s World Direction pin. And now your actor will move along the spline towards that direction!

Hope this helps :innocent:

2 Likes