torsdag 17 mars 2016

Agents avoiding collision

In this scene we have made different approaches to making the agents avoid each other. First we tried using the UnitySteer script "Steer For Spherical Obstacles" on one of the agents. This script was not supposed to be used in that way, we found out. Then we tried with the script "Steer For Evasion". This script uses another agent as the reference to avoid. The disadvantage with that is that the agent can only avoid one other object for each script. 

The hard part in the simulation was to find out which parameter to change in order to avoid collisions between the agents. We needed to find the radius parameter for which represented the agents "comfort zone". In the end we found this to be a combination of the "Safety Distance" and the vehicles radius. The result is shown in the video above. In the video above ther's a slight offset in the vertical axis between the two agents.

If there's no offset the agents will do the same movements for a while and then diverge from each other. This is something that can happen in the real world too, but maybe not this extreme.

Inga kommentarer:

Skicka en kommentar