How do I make a cube move smoothly around in a circle against a pivot point?

Lets say I have a static mesh actor in middle of a level. How would I go about moving a cube smoothly in a circle around the static mesh actor? I also want to the rotating circle to always have the same height level as the static mesh actor, so that if I move the actor, the cube also moves with it.

I heard timelines might help but does that also account for my moving of the pivot/static mesh actor?

Sorry, I don’t quite understand/ can’t visualize this. Could you show an example or explain it a bit more?

Get the position of the static mesh, add a horizontal offset vector to it and use the resulting vector as the position vector of the rotating actor.

To rotate the actor you just have to rotate the offset vector before you combine it with the mesh positional vector.

Do this every tick.

HTH

How much vector math have you done?

You need to know what adding two vectors together does and how a vector rotation works.

Since you want the mesh to be the center of the rotation, the vector from the pivot mesh to the rotating object has a constant length. This vector is the offset vector because the rotating object is offset from the pivot object. By rotating this vector you will also rotate the relative position of the rotating object.

Since you want the height to be the same, just make the original offset vector have a zeroed out Z component.

I imagine your looking for a simple solution so mabe.

Add the cube in the same blueprint as the statich mesh actor, create a arrow component aswell, (or anything rely, just set it to be “hidden in game”),

next make the cube be a child of the arrow by dropping it under it in the hierarchy.

next move the cube out to the desired distance from the static mesh actor.

then go into the event graph, drag of a node from the arrow into the graph.

then drag of that node and make a “add local rotation” node.

connect the rotation node to event tick.

set the rotation values to something small, it will updated each frame.

profit

I know the basics of vector math.