首页 > 技术文章 > [UE4]计算2点坐标附近的坐标:线性插值法

timy 2018-04-21 11:03 原文

float distance = FVector::Distance(SelfLocation, TargetLocation);
float  p = 300.f / distance;
DrawDebugPoint(GetWorld(), FMath::Lerp(SelfLocation,TargetLocation,p),20,FColor::Red,false,0.03);

 

推荐阅读