球形检测中的Location和ImpactPoint
在用球形检测的时候发现Location输出的是球体的中心位置,而ImpactPoint输出是接触点的位置
在源码中的解释 :
/**
* The location in world space where the moving shape would end up against the impacted object, if there is a hit. Equal to the point of impact for line tests.
* Example: for a sphere trace test, this is the point where the center of the sphere would be located when it touched the other object.
* For swept movement (but not queries) this may not equal the final location of the shape since hits are pulled back slightly to prevent precision issues from overlapping another surface.
翻译内容:
*在世界空间中,如果受到撞击,运动形状最终会靠在受影响物体上的位置。 等于在线测试的影响点。
*示例:对于球体跟踪测试,这是球体接触另一个对象时将位于球体中心的位置。
*对于扫掠运动(但不是查询),这可能不等于形状的最终位置,因为击点会稍微向后拉,以防止精度问题与另一个表面重叠。
*/
UPROPERTY()
FVector_NetQuantize Location;
/**
* Location in world space of the actual contact of the trace shape (box, sphere, ray, etc) with the impacted object.
* Example: for a sphere trace test, this is the point where the surface of the sphere touches the other object.
* @note: In the case of initial overlap (bStartPenetrating=true), ImpactPoint will be the same as Location because there is no meaningfu