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

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);
主站蜘蛛池模板: 南投县| 阳西县| 涪陵区| 包头市| 青浦区| 成安县| 汤阴县| 色达县| 屏东县| 平原县| 班戈县| 东方市| 拉孜县| 雅江县| 大英县| 阳曲县| 奈曼旗| 庆阳市| 耒阳市| 合川市| 凌海市| 惠州市| 山阳县| 岳阳县| 库车县| 那曲县| 湖北省| 新晃| 寻甸| 报价| 阿图什市| 龙口市| 常山县| 镇江市| 门源| 山西省| 遵化市| 淳安县| 青神县| 民权县| 临颍县|