# Set actor location does not work with actor component tick

**URL:** <https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032>\
**Category:** C++\
**Tags:** actor-component, tick, unreal-engine, UE4-25, question\
**Created:** [February 17, 2022, 8:39am UTC](https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032 "2022-02-17T08:39:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Althaen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Althaen](https://forums.unrealengine.com/u/Althaen)\
**Post date:** [February 17, 2022, 8:39am UTC](https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032/1 "2022-02-17T08:39:13Z")

</div>

I’m trying to have an actor component move the actor it is attached to every tick but it will not work. The tick itself is working but the actor set location is not.

Strangely when I select the actor in the world outliner it suddenly starts working in the game.

---

<div class="post-metadata">

**Author:** ![ikheiri](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ikheiri](https://forums.unrealengine.com/u/ikheiri)\
**Post date:** [February 17, 2022, 10:36am UTC](https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032/2 "2022-02-17T10:36:07Z")

</div>

It’s a bit unclear what you mean by having an actor component move the actor. Can you share the structure of your actor blueprint and the code you are using.

---

<div class="post-metadata">

**Author:** ![Althaen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Althaen](https://forums.unrealengine.com/u/Althaen)\
**Post date:** [February 17, 2022, 11:39am UTC](https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032/3 "2022-02-17T11:39:47Z")

</div>

It’s just an actor component that calls set actor location on its owner. The issue seems to be how I add the component to the actor. I can’t find how you’re supposed to add a component outside of a constructor.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [February 17, 2022, 1:47pm UTC](https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032/4 "2022-02-17T13:47:31Z")

</div>

You can create components at runtime, but I don’t think the way you add it is the issue.  
How you you get a reference to your parent actor in the component code?

---

<div class="post-metadata">

**Author:** ![Althaen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Althaen](https://forums.unrealengine.com/u/Althaen)\
**Post date:** [February 18, 2022, 2:11am UTC](https://forums.unrealengine.com/t/set-actor-location-does-not-work-with-actor-component-tick/499032/5 "2022-02-18T02:11:21Z")

</div>

GetOwner()
