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

**URL:** <https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563>\
**Category:** Blueprint\
**Tags:** transforming-actors, timelines, unreal-engine, Blueprint, question\
**Created:** [May 14, 2017, 10:07am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563 "2017-05-14T10:07:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Falconeyi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Falconeyi](https://forums.unrealengine.com/u/Falconeyi)\
**Post date:** [May 14, 2017, 10:07am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/1 "2017-05-14T10:07:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![NoobsDeSroobs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoobsDeSroobs](https://forums.unrealengine.com/u/NoobsDeSroobs)\
**Post date:** [May 14, 2017, 10:11am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/2 "2017-05-14T10:11:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Falconeyi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Falconeyi](https://forums.unrealengine.com/u/Falconeyi)\
**Post date:** [May 14, 2017, 10:23am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/3 "2017-05-14T10:23:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NoobsDeSroobs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoobsDeSroobs](https://forums.unrealengine.com/u/NoobsDeSroobs)\
**Post date:** [May 14, 2017, 10:32am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/4 "2017-05-14T10:32:12Z")

</div>

How much vector math have you done?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_68f15488](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_68f15488](https://forums.unrealengine.com/u/anonymous_user_68f15488)\
**Post date:** [May 14, 2017, 10:47am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/5 "2017-05-14T10:47:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Falconeyi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Falconeyi](https://forums.unrealengine.com/u/Falconeyi)\
**Post date:** [May 14, 2017, 10:50am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/6 "2017-05-14T10:50:33Z")

</div>

I know the basics of vector math.

---

<div class="post-metadata">

**Author:** ![NoobsDeSroobs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NoobsDeSroobs](https://forums.unrealengine.com/u/NoobsDeSroobs)\
**Post date:** [May 14, 2017, 11:00am UTC](https://forums.unrealengine.com/t/how-do-i-make-a-cube-move-smoothly-around-in-a-circle-against-a-pivot-point/393563/7 "2017-05-14T11:00:07Z")

</div>

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.
