How do I make a Blueprint Character move around an actor like a carousel?

Say I have a blueprint Character, and I want it to move around an Actor. Like, the Actor stays in place, and the Character only have one movement that goes round and round the Actor like a carousel, and you can control it’s movement speed.

Carousel like this: Carousel - Wikipedia

I’ve looked into using a spline based movement but it seems there’s no way to make the spline circular except eyeballing it, and I’m not sure how I can detach and reattach the character to the start of the blueprint once it reached the end of the spline.

So, any ideas on how to achieve this?


You can easily make a circular spine, I have the code laying somewhere. Would have to dig it out, I also posted it in the UE4 forums a couple of years ago.

Another very easy way to make a circular movement is to attach your actor to a springarm component. You rotate the springarm in place while its length serves as radius.

edit: found it:

here: How to create a torus for an atom? - Blueprint Visual Scripting - Unreal Engine Forums

and here: Solar System Simulator/Generator - Blueprint Visual Scripting - Unreal Engine Forums

If you do not need the show the trajectory, you can skip the spline mesh part. The support for tilt and ellipsoids is also there. You can remove it, of course.

But again, if you want something straightforward, go for the springarm method.

Thank you very much!

Any ideas on how to detach and reattach an actor/pawn/character between different splines btw?

You do not actually need to attach or detach anything. The whole idea revolves (ehm) around the spline’s length. Use this node GetLocationAtDistanceAlongSpline to output a world location and place your object there.

Feed that node with another spline and your object will follow it. Do in Tick, gradually increasing the GetLocationAtDistanceAlongSpline value and you will end up moving along the spline’s path.

In addition, if you combine it with GetTangentAtDistanceAlongSpline node and you’ll get the forward vector.

Thank you!

But what I mean was, I needed to switch the player pawn from one spline to another so I’ll need to detach it and reattach it.

Not really, no. You do not need to attach actors or static meshes to the splines to follow them. Have a look:

This actor has a mesh and 2 splines, one small and simple, the other one a wee bit twisty:

When I hit Tab key, I switch between the two:

Essentially, you’d need to write a function that takes a spline, and ask the mesh/actor to follow the spline you’ve supplied. Attachments will unnecessarily complicate the whole thing.

The end result:

I realise this a crude example! But if you provide a bit more detail regarding what you’re tying to achieve, how you expect the objects to interact with the spline, I might be able to advise with something more tangible.

Thanks for the example! :smiley: That is what I’m looking for.