onsdag 13 april 2016

Foramtions

Lately we've been working on implementing group formations consisting of three agents. To begin with, we've only tried to get a basic formation to work, consisting of three agent on a straight horizontal line moving upwards, towards a target goal location.

The formation is build from the leader placed in the middle, and the two other agents placed adjacent with a fixed distance to the leader. To goal is for the agents to always stay on each side of the leader. so far, we've only managed to position a leader, spawn the adjacent agents and get them moving towards, and finally to a target point. The agents direction and rotation follow the leader's, but in case of a rotation, the agents doesn't increase/decrease their speed to match the leaders positioning.

To solve this, we've been thinking of implementing a point for each agent adjacent to the leader, which gives each agent a individual target point. drawing a transparent perpendicular line to the leaders direction and placing points on it with a fixed distance, the agents will now have a target point, which will update with the leaders movement. in case the agent is placed behind the line, the agent will have to increase it's speed in order to catch up to the leader, and vice verse, having the agent to slow down, in case he's in front of the leader.

Having static formation with a too high velocity and a rapid rotation would result in the perception the outer agent is teleported, which is not good. therefore, we're not going with the static approach. also, having the leader stop when making a rotation (like a tank), is not up for discussion due to unnatural looks of it.


Inga kommentarer:

Skicka en kommentar