# Moving an actor to player pawn position when in x range?

**URL:** <https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403>\
**Category:** Blueprint\
**Tags:** actor-blueprint, move-to-location, actor-location, unreal-engine, Blueprint, question\
**Created:** [September 25, 2017, 10:36am UTC](https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403 "2017-09-25T10:36:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cranks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cranks](https://forums.unrealengine.com/u/Cranks)\
**Post date:** [September 25, 2017, 10:36am UTC](https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403/1 "2017-09-25T10:36:09Z")

</div>

Hello, fairly new to unreal so still learning the ropes.

I’m currently trying to move one of my actors to the player pawn location after i spawn them into the world. I know i need to do it on tick and set some kind of range and normalise the distance. However, every time i try to do it, it basically ignores the code?

 ![214573-npc-to-player.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/a/35a96f303c61b87d9c8ecf7714e536df6b4f0add.jpeg)

 ![214574-npcspawncode.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/5/2757de09eeb428d799c34b5c3ef6ddb898ec77fe.jpeg)

Thanks!

---

<div class="post-metadata">

**Author:** ![A7E7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A7E7](https://forums.unrealengine.com/u/A7E7)\
**Post date:** [September 25, 2017, 12:41pm UTC](https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403/2 "2017-09-25T12:41:48Z")

</div>

On event tick you just **add** the current location of your hockey pawn to your hockey pawn location per frame. Don’t know if this is intended?

One of these should be your solution:

 ![214570-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/f/28f6068dc9de7e40871c3928d384fdbe05c696ae.png)

---

<div class="post-metadata">

**Author:** ![Cranks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cranks](https://forums.unrealengine.com/u/Cranks)\
**Post date:** [September 25, 2017, 12:54pm UTC](https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403/3 "2017-09-25T12:54:26Z")

</div>

Thank you! Will give these a shot. 😃

---

<div class="post-metadata">

**Author:** ![Cranks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cranks](https://forums.unrealengine.com/u/Cranks)\
**Post date:** [September 26, 2017, 8:41am UTC](https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403/4 "2017-09-26T08:41:46Z")

</div>

Yup the middle one is exactly what i needed. Thank you! 😃

---

<div class="post-metadata">

**Author:** ![A7E7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A7E7](https://forums.unrealengine.com/u/A7E7)\
**Post date:** [September 26, 2017, 9:06am UTC](https://forums.unrealengine.com/t/moving-an-actor-to-player-pawn-position-when-in-x-range/405403/5 "2017-09-26T09:06:52Z")

</div>

Awesome, no problem!  
Can you mark it as solved? Thanks!
