# Mobile Input Lag

**URL:** <https://forums.unrealengine.com/t/mobile-input-lag/77215>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [October 30, 2016, 11:13pm UTC](https://forums.unrealengine.com/t/mobile-input-lag/77215 "2016-10-30T23:13:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0757868c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0757868c](https://forums.unrealengine.com/u/anonymous_user_0757868c)\
**Post date:** [October 30, 2016, 11:13pm UTC](https://forums.unrealengine.com/t/mobile-input-lag/77215/1 "2016-10-30T23:13:15Z")

</div>

For some reason I’m getting a fairly considerable input lag on mobile, enough that it affects gameplay (dodging projectiles in a 2D game). I’ve tested other games with the same device to make sure that isn’t the issue, and they have instantaneous reaction. Is there anything that could cause this to happen?

For reference, this is how I’m doing input, in the tick of the object being moved:

```auto

bool IsPressed;
float DesiredX, DesiredY;
Controller->GetInputTouchState(ETouchIndex::Touch1, DesiredX, DesiredY, IsPressed);

if(IsPressed)
{
	FVector WorldDir;
	Controller->DeprojectScreenPositionToWorld(DesiredX, DesiredY, this->DesiredLoc, WorldDir);
}

if(InterpMovement)
{
	FVector NewLoc = FMath::VInterpTo(this->GetActorLocation(), this->DesiredLoc, DeltaTime, 1.f);
	NewLoc.Z = this->GetActorLocation().Z;
	this->SetActorLocation(NewLoc);
}
else
{
	FVector NewLoc = DesiredLoc;
	NewLoc.Z = GetActorLocation().Z;
	SetActorLocation(NewLoc);
}

```

Frame rate is a consistent 30fps.
