Simple rotation along a spline

Hello, I’m new to UE4 and am working on moving a mesh along a spline. I’ve successfully achieved this by using the animation blueprint from the Blueprint_spline level in the Content Example 4.3. This works well and I can move my mesh along the spline. However, I’d like my mesh to rotate toward the direction of the spline. In the current blueprint, my mesh does not rotate at all. Using the blueprint attached, how can I achieve this?


Have you tried the Get World Rotation At Distance Along Spline node instead of Direction?

Hello DougB,

I would highly recommend taking a look at these tutorials by UE4 user Dokipen, he goes over all of this and more in the first 3 tutorials, including getting random rotation, rotation along a spline, and location offset along a spline. In the last tutorial he shows how to use what you have learned to create a spline based Road Tool (which is why I watched), but video 2 & 3 would be the best for you I think!

Youtube Playlist: Unreal Engine Spline Road Tool Tutorial - YouTube
Forum Article: [TUTORIAL] Create a procedural spline road tool in blueprints 4 part video series - Community Content, Tools and Tutorials - Unreal Engine Forums

Hope that helps, I can post an image with the full setup if you’d like as well. Welcome to the forums! :slight_smile:

Thanks Anadin. I did add the Get World Rotation At Distance Along Spline, as you suggested, and it works…to an extent. My mesh does rotate as it moves along the spline, but not in the correct orientation. It’s sorta strange. So I’m definitely missing something else. Do you have any further suggestions?

Thanks, Doug

Thanks DotCam. Actually, I did see the first video of this series, and felt that it didn’t apply as it covers road construction using splines. However, with your suggestion I will watch the other two videos. Thanks! Doug

You need to match the vector, so if your particle effect has for example y forward, break the rotation along spline into the 3 floats and them make a rotation but swap the vectors into the correct order for you.

May be you could say how?? :slight_smile:

?? You are asking a non sequitur, if yo ulok at his image… he already has, what you are asking him if he has,…

NO ONE CAN COME UP WITH A SIMPLE WAY TO ROTATE AN OBJECT as it travels along a spline? (Like a UFO Spinning), What would one add to the above BP to achieve this?*** No one actually ever answered!!!***

Hey guys. I know this post is old, but I figured out how to deal with this problem.
It’s really simple in fact, I used the “Make Rot from Z” blue print node. My mesh is facing upward, so if yours isn’t, maybe you could try using “from X” or “from Y” instead of “from Z” to make it work for you. :slight_smile:

1 Like

Thank you for coming back to your own thread and updating, I’m trying to rotate an entire hallway that I’ve blocked off, and moving through the air, I need it to be 180 degrees rotated before landing, Think of a spinning elevator. no other node has been helpful in this regard.