cg小白兔 发表于 2023-10-9 14:21:48

【更新】Local Avoidance 2.1.1













This package contains fast lightweight solution for local avoidance. It is developed with DOTS in mind, as result it takes advantage of Unity latest technology stack like SIMD mathematics, Jobs and Burst compiler.

Local avoidance allows agent to avoid dynamic obstacles, with accuracy, speed and not requiring pre processing. However keep in mind it does not replace global navigation (etc. A* Pathing solutions) which is designed to find most optimal path around static obstacles. Local avoidance it is intended to be used in complimentary with such a system in full scale game.

At its core it uses novel solution, which is heavily inspired by Starcraft 2 game.

Is there components that I can use?
No, the whole logic is separated into single structure and no components are used. Thus allowing easy integration in any existing Global Pathing system, regardless if it's OOD or DOD.

For this reason this package is highly recommended for people who have coding experience as it is expected from user to integrate the solution into their own ecosystem. There are component ready demos, but they are solely there as examples.

For those, who want mono components or ecs based implementation you can check version 3.0 as Agents Navigation.

What is the API?
The whole avoidance solution is contained in a single structure called SonarAvoidance. The usage of structure is composed of mainly 4 steps: construct, add obstacles, find avoidance direction and cleanup.
var sonar = new SonarAvoidance(...)
sonar.InsertObstacle(...)
sonar.FindClosestDirection(out float3 direction)
sonar.Dispose()
Support Discord
Demo Zerg

Key Behaviours
Manages navigation out of concave obstacles
Circles target
Avoids head to head moving
Accurately respects radius
Predicts collisions and avoids based on that
Avoids only when necessary

Dependencies
Tested with Unity 2019.4
Package com.unity.mathematics
Package com.unity.collections
Package com.unity.burst

Note: This does not include Global Avoidance which is typical archieved using A* algorithm on data structures like NavMesh or Grid and targeted for static obstacles. Local avoidance typicaly used as complimentary system for it to target dynamic obstacle avoidance.


该软件包包含快速、轻量级的局部回避解决方案。它是以 DOTS 为基础开发的,因此利用了 Unity 的最新技术栈,如 SIMD 数学、Jobs 和 Burst 编译器。

局部避障允许代理避开动态障碍物,准确、快速且无需预处理。但请记住,它并不能取代全局导航(如 A* 路径解决方案),后者旨在找到绕过静态障碍物的最佳路径。局部避障系统是为了在大型游戏中与此类系统配合使用。

其核心是采用新颖的解决方案,灵感主要来自《星际争霸 2》游戏。

有我可以使用的组件吗?
没有,整个逻辑被分离成单一结构,没有使用任何组件。因此可以轻松集成到任何现有的全局路径系统中,无论是 OOD 还是 DOD。

因此,强烈建议有编码经验的用户使用此软件包,因为用户需要将解决方案集成到自己的生态系统中。虽然有组件演示,但它们只是作为示例。

如果您希望使用 mono 组件或基于 ecs 的实现,可以查看 3.0 版本的代理导航。

应用程序接口是什么?
整个避障解决方案包含在一个名为 SonarAvoidance 的结构中。该结构的使用主要包括 4 个步骤:构建、添加障碍物、查找避障方向和清理。
var sonar = new SonarAvoidance(...)
sonar.InsertObstacle(...)
sonar.FindClosestDirection(out float3 direction)
sonar.Dispose()
支持 Discord
虫族演示

主要行为
管理凹面障碍物的导航
环绕目标
避免迎面移动
精确控制半径
预测碰撞并据此避开
仅在必要时避开

依赖关系
已在 Unity 2019.4 中测试
包 com.unity.mathematics
包 com.unity.collections
包 com.unity.burst

注:这不包括全局避障,全局避障通常在 NavMesh 或 Grid 等数据结构上使用 A* 算法存档,并针对静态障碍物。局部避障通常用作针对动态障碍物避障的补充系统。





页: [1]
查看完整版本: 【更新】Local Avoidance 2.1.1