蓝图节点

C++接口
/** Generates a random location reachable from given Origin location.
* @return Return Value represents if the call was successful */
UFUNCTION(BlueprintPure, Category = "AI|Navigation", meta = (WorldContext = "WorldContextObject", DisplayName = "GetRandomReachablePointInRadius", ScriptName = "GetRandomReachablePointInRadius"))
static bool K2_GetRandomReachablePointInRadius(UObject* WorldContextObject, const FVector& Origin, FVector& RandomLocation, float Radius, ANavigationData* NavData = NULL, TSubclassOf<UNavigationQueryFilter> FilterClass = NULL);
/** Generates a random location in navigable space within given radius of Origin.
* @return Return Value represents if the call was successful */
UFUNCTION(BlueprintCallable, Category = "AI|Navigation", meta = (WorldContext = "Worl

本文介绍了UE4中两个用于生成随机位置的C++函数:K2_GetRandomReachablePointInRadius和K2_GetRandomLocationInNavigableRadius。前者确保返回的位置是可达的,而后者则可能返回不可达的导航点,特别是在存在障碍如孤立平台的情况下。选择使用哪个函数取决于是否需要保证路径可达性。
最低0.47元/天 解锁文章
2364

被折叠的 条评论
为什么被折叠?



