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

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);
主站蜘蛛池模板: 贵港市| 宝兴县| 萍乡市| 女性| 西华县| 临武县| 凤城市| 定远县| 黔江区| 富顺县| 上高县| 武汉市| 屏东县| 和硕县| 宜丰县| 孟州市| 松溪县| 南投县| 棋牌| 英山县| 上饶县| 闵行区| 孙吴县| 淮滨县| 江北区| 巴林左旗| 钟祥市| 丁青县| 紫金县| 丹东市| 达拉特旗| 华宁县| 永福县| 福海县| 乐业县| 大宁县| 巴南区| 南澳县| 渭南市| 新和县| 泽州县|