# SetRelativeLocation() with Lerp

**URL:** <https://forums.unrealengine.com/t/setrelativelocation-with-lerp/478546>\
**Category:** Character & Animation\
**Tags:** lerp, unreal-engine, question\
**Created:** [February 12, 2021, 5:59am UTC](https://forums.unrealengine.com/t/setrelativelocation-with-lerp/478546 "2021-02-12T05:59:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Big\_Rubber\_Ducky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/big_rubber_ducky/32/581031_2.png) [@Big\_Rubber\_Ducky](https://forums.unrealengine.com/u/Big_Rubber_Ducky)\
**Post date:** [February 10, 2021, 3:59am UTC](https://forums.unrealengine.com/t/setrelativelocation-with-lerp/478546/1 "2021-02-10T03:59:09Z")

</div>

I am not sure why the code pasted like that

---

<div class="post-metadata">

**Author:** ![Big\_Rubber\_Ducky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/big_rubber_ducky/32/581031_2.png) [@Big\_Rubber\_Ducky](https://forums.unrealengine.com/u/Big_Rubber_Ducky)\
**Post date:** [February 12, 2021, 5:59am UTC](https://forums.unrealengine.com/t/setrelativelocation-with-lerp/478546/2 "2021-02-12T05:59:17Z")

</div>

This should be simple, but I might be missing something. I am trying to make this move smoothly back and forth between 2 points. I am trying to Use Lerp and it is still just snapping to the new location. Any thoughts?

```
void AMovingActor::MoveOrbiters()
{
	// Orbiter1
	FVector StartPos = FVector(0.f, 1000.f, 0.f);
	FVector EndPos = FVector(0.f, 120.f, 0.f);
	FVector Movement = FMath::Lerp(StartPos, EndPos, 1.f);
	Orbiter1->SetRelativeLocation(Movement);

	//Orbiter2

}
```
