# Attach actor to other actor location issue

**URL:** <https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [December 2, 2022, 6:44pm UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184 "2022-12-02T18:44:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 2, 2022, 6:44pm UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/1 "2022-12-02T18:44:53Z")

</div>

Hi,

I’m working on a VR game and I’m trying to attach actors to a main actor and force them to align in a circle around the main actor’s center.

For that, I’m using three BP, the main actor is the Carrousel, a second one is a spline the third one is the class of the actors that will go onto that circle.

The idea is that the user can grab the actors and swipe the entire circle around him hence the spline so that the grabbed actor can only move around that spline.

I’ve managed to make the spline as a circle around the Carrousel actor and also to put the grabbable actors on that circle.

Now, my first attempts seemed to work but was not working perfectly. I was using the vector of the subtracted original grabbable object position and its new one with the Find closest point on spline.

It’s working fine for object in front of the user but not on those behind which by thinking about it is normal, if the user goes to the left, the object in front follow and go left but those behind go left too instead of right.

So to solve this, I’m trying to make the main carousel rotate around its axis so that all objects on the circle will be affected (except the grab one that is ignored).

For that, I’m attaching the objects to the main carrousel with the node Attach Actor to Actor and this is where I have a problem.

No matter what I try or at what moment I put this node, I can’t manage to not have it affect the grabbable actors position :

In the keep location relative, they go like this instead of being in the circle like before :

 ![Capture d’écran (964)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/a/77a53750d54ad1987dca33cfc20407e3693fecb2.jpeg)

There are in circle but not around the main carrousel object (the gizmos on screen)

If I put the Attach actor in Keep World mode, it puts the actors into “two positions” in front and behind the carrousel actor like this :

 ![Capture d’écran (965)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/a/80aeed2bfcde0e7cf131395f597bd08f7e65796b.jpeg)

What I want is for them to stay like this :

 ![Capture d’écran (966)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/b/f3b915b23ee1b85efcce2546fc827945839abed8.jpeg)

I’m setting their position with the set actor transform to get them along the circle with this simple function :

> **[bp carrousel posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/1lr7cty_/)**
>
> No description provided

I tried to change it by Set Relative Transform but it gives even weirder results.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 2, 2022, 7:50pm UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/2 "2022-12-02T19:50:52Z")

</div>

I don’t know if it’s the spline not helping, or some sort of local/world problem, but I can think of a couple of simpler ways.

1. You can have any number of scene components in the center. When the user wants to ‘move a ball’, you can attach it to one of the scenes, and just rotate the scene.

2. Rather than using a spline, you can just use the formula of a circle, or ‘rotate vector around axis’.

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 9:13am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/3 "2022-12-05T09:13:12Z")

</div>

Hi, thank you for your answer

1. I tried to attach the balls to the carrousel scene root component and also to the carrousel actor itself, I still have the same transform issue where my circle positioning function is not working anymore, whether I attach them before or after applying the circle function.

2. Yes that is what I wanted to use but I need to be able to keep the balls in circle first.

Thanks

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 9:15am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/4 "2022-12-05T09:15:22Z")

</div>

1. You need to attach the sphere to the carousel scene, then rotate _that_ scene.

2. It’s a pretty easy node to use. Have you tried?

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 9:21am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/5 "2022-12-05T09:21:04Z")

</div>

When I attach the spheres to the carrousel scene root component, their circle disposition is not working anymore, I need them to stay in a circle around the scene root component before attempting to moving them. It acts like my second pic in the original post, all the spheres are stacking in one place instead of being line up on a circle, with keep relative or keep world.

Once they are correctly on a circle yes I can use the rotate around axis that was my original idea hence why I need to attach the spheres to the carrousel so that they can follow its rotation.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 9:49am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/7 "2022-12-05T09:49:24Z")

</div>

I made a number of sphere components and attached them to a central node with

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/4/5e48a198a01077d677a31df7948bccf6c44f600a.png)

Then, I just add rotation to each ball’s central scene using tick

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/6/c76756656151d899496b942380f171ec1bff6054.png)

![rotate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/e/63e804172f33df0b0e44885f6b7c4197aec7c159.gif)

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 10:13am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/8 "2022-12-05T10:13:25Z")

</div>

Yes but there are not positionned in a circle around the central scene component like my third pic, they need to be in a circle and move as a circle around the central scene.

Also, I can’t use the construction script, the Carrousel, the moving cubes, the grabbable spheres (they will be arrow in the final project, here sphere are just placeholders) and the spline are all different BPs.

Here what’s firing at begin play in the BP Carrousel, the BP that acts as the center around all the others needs to turn around :

 ![Carrousel-2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/b/e1bea016056be97165cdeb026fc842b46a9d426e.png)

 ![Carrousel-3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/a/2aabc849b1e5e53393a733f655949051e2752c9a.png)  
 ![Carrousel-4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/e/2aee4aaa4e5f8bd53cbde4a13916fca02e9b9c2b.png)  
 ![Carrousel-5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/b/cab93f1cd77d39eccee174955a55796dcc60a032.png)  
 ![Carrousel-6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/c/11c1675f3c35ecbb0b7ebc3b97b96f2fcdea31cd.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 10:24am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/9 "2022-12-05T10:24:30Z")

</div>

It doesn’t matter where you do it ( construction or event graph ), the principle is the same. Same with separate blueprints.

I can distribute them around the edge, for example

![rotate2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/5/1251d7a9fa3f9f68e67554b28215f15361a448f9.gif)

I will look at your code a bit more… Ok, looks a bit of a nightmare 😉

Tell me what needs to be a separate BP? The carousel and the shapes ( each )?

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 10:42am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/10 "2022-12-05T10:42:46Z")

</div>

Yes, the carrousel, the shapes, all need to be separate BPs.

I’ll try to move the attach node to the spawn function so way ahead before I put them in circle to see.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 11:03am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/11 "2022-12-05T11:03:19Z")

</div>

Ok. Now my BPs only have this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/6/e26e10e459182205d6826613dd45176e9911adc5.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/3/7833c6391fbb514528a18681fe2049070aa9da06.png)

and the carousel

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/0/c10d21b999f60efdf2bbb77c06111a5fdff60e34.png)

![rotate3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/d/6bde391148de932e887d615b4ec1e502498dcbbc.gif)

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 11:28am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/12 "2022-12-05T11:28:02Z")

</div>

Thank you for your time.

How did you line them up in a circle around the carrousel actor ? How do you control the circle radius ? And where do you attach them to the carrousel ?

I copied my functions in blueprintue so it’s easier to read.

> **[carrousel-1 posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/3lpn727v/)**
>
> No description provided

> **[carrousel-2 posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/e1ust-my/)**
>
> No description provided

> **[carrousel-3 posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/n74ddyhe/)**
>
> No description provided

> **[carrousel-41 posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/0ywlmfug/)**
>
> No description provided

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 11:35am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/13 "2022-12-05T11:35:19Z")

</div>

_How did you line them up in a circle around the carrousel actor ?_

The shape is just the required distance from the center of it’s blueprint

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/6/406cda9e01293b1854f1b1504bf5c99a47976a3b.jpeg)

The carousel just spawns them at its own location, so it will always work.

_How do you control the circle radius ?_

It’s just that distance shown above.

_And where do you attach them to the carrousel ?_

In this case, they are not attached. Each BP simply revolves around its own center.

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 11:42am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/14 "2022-12-05T11:42:17Z")

</div>

Yes but they need to be attached so that they follow the center rotation when user gives the order to rotate. The core of my problem is the fact that attach actor to component or to actor messes up with the transform I apply to the attached actor, no matter when I attached the actors to the other actor or component.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 11:45am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/15 "2022-12-05T11:45:18Z")

</div>

They can still be attached, even though they’ve been spawned.

I just attached them to the ring, it works just the same

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/7/4c791f63622b7dee5295d93076dbb875c4f5efa0.png)

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 11:47am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/16 "2022-12-05T11:47:10Z")

</div>

Yes.

But why does the attach node interfere with the attached actor transform ? In my case, it does not give the same result

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 11:47am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/17 "2022-12-05T11:47:44Z")

</div>

It doesn’t for me.

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 11:48am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/18 "2022-12-05T11:48:22Z")

</div>

Well it does for me no matter if it’s in Keep relative or Keep world.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 11:49am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/19 "2022-12-05T11:49:11Z")

</div>

Are you using ‘attach actor to actor’?

---

<div class="post-metadata">

**Author:** ![jdgfkf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jdgfkf](https://forums.unrealengine.com/u/jdgfkf)\
**Post date:** [December 5, 2022, 11:50am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/20 "2022-12-05T11:50:54Z")

</div>

Yes, I tried Attach Actor to Actor, Attach Actor to Component, Keep world, Keep Relative.

I tried Set Actor Transform and Set Actor Relative Transform.

The keep relative and set actor transform line them in circle but the circle is translated to the right or left of the carrousel actor instead of being around it with it as its center.

UE 5.0.3 and the project was made in 4.27 with the VR Collaborative template.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 5, 2022, 11:53am UTC](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184/21 "2022-12-05T11:53:12Z")

</div>

I’m using 5.1, but I think it will be the same.

[Next page](https://forums.unrealengine.com/t/attach-actor-to-other-actor-location-issue/720184.md?page=2)
