Hi every body!
I’ve asked some questions before about my problem, that actor jitter when moving on large terrain.
Today, i know that isn’t actor jitter, it is jitter from Camera.
My simple code follow
void ASkyDriving_Mi17::Move(float DeltaTime)
{
FVector currentVelo = getCurrentVelo();
SetActorLocation(GetActorLocation() + currentVelo*DeltaTime);
currentVelo.GetSafeNormal();
FVector dir = GetActorForwardVector().GetSafeNormal();
if (!currentVelo.Equals(dir,0.5f))
{
SetActorRotation(FMath::Lerp(GetActorRotation(), currentVelo.Rotation(), 0.05f));
}
}
I don’t know why camera small jitter, as i said before, i think that camera update doesn’t sync with actor transform, or Unreal engine has more than one Tick?.
My attached image is my actor structure ( a pawn ).
Please help me, thank you so much!
Best,