[UE4]Linear Algebra & Plane Geometry API

1 · 王爱国 · June 23, 2016, 3:36 p.m.
keywords:UE4、Linear Algebra、Plane Geometry、线性代数、解析几何 范围判定 检测一个点是否在一个多边形(或矩形)的内部(2D和3D) FBox2D::IsInside(const FVector2D& TestPoint) FBox::IsInside(const FVector& TestPoint) FIntRect::Contains( FIntPoint P ) 角度计算 计算两个向量的夹角(Get an angle between 2 Vectors),范围:(0, 180) float AimAtAngle = FMath::RadiansToDegrees(acosf(FVector::DotProduct(PlayerDirection, MouseDirection))); 参考:How to get an angle between 2 Vectors? https://answers.unrealengine.com/questions/31058/how-to-get-an-angle-between-2-vector...