官术网_书友最值得收藏!

Avoidance

Avoidance steering behavior involves avoiding collisions between moving agents, objects, and other moving agents. The collision avoidance calculated from ForceToAvoidAgents creates a steering force in the tangent direction of a potential agent as two agents move closer to one another. Predictive movements are used to determine whether two agents will collide within a given amount of time.

Obstacle avoidance, on the other hand, approximates sandbox objects using spheres and uses the agent's predictive movement to create a steering force tangent for the potential collision.

Collision avoidance

To calculate the force to avoid other agents, based on the minimum time, to collide with other agents, we can use the ForceToAvoidAgents function.

local avoidAgentForce = 
    agent:ForceToAvoidAgents(minTimeToCollision);

Obstacle avoidance

A similar force to avoid other dynamic moving obstacles can be calculated using the ForceToAvoidObjects function.

local avoidObjectForce =     
    agent:ForceToAvoidObjects(minTimeToCollision);
主站蜘蛛池模板: 灯塔市| 陵川县| 六安市| 漯河市| 肥乡县| 深圳市| 札达县| 康保县| 宁阳县| 安陆市| 上思县| 陆丰市| 玉门市| 梨树县| 宜丰县| 休宁县| 黄浦区| 阿克| 汉阴县| 明星| 渭南市| 洱源县| 加查县| 化州市| 肥西县| 紫云| 固原市| 威远县| 灵山县| 澳门| 北流市| 台东县| 白朗县| 泰兴市| 阿合奇县| 凤冈县| 鹿邑县| 察哈| 营口市| 登封市| 旬阳县|