# Tactical Formation with multiple objects

This topic is 2342 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I created a video about my problem:
[media]
[/media]

Algorithm:
Given a group of objects and a goal.

STEP 1 - Find the center of the group.
STEP 2 - Find the path from the center to the goal (it's a list of points).

STEP 3 - For each object, send it to its formation position (relative to group's position).
STEP 4 - Move the objects.
STEP 5 - Repeat STEP 4 If at least one object moved.
STEP 6 - If the goal is not reached, grab the next position of the path and go to STEP 3.

STEP 7 - End.

As you can see it's not perfect, If you have any idea how to improove it, I would thank. Edited by hdlopesrocha

##### Share on other sites
Are you using A* or steering?

##### Share on other sites
Bi-Directional A* with Manhattan Heuristic Edited by hdlopesrocha

##### Share on other sites
Hi
STEP 3 - For each object, send it to its formation position (relative to group's position).[/quote]

What about making the group moves as one object in the open area , and every object will move on its own when facing an obstacle ?
The way your objects move reminded me of the old typewriter , the objects move few stpes up and right and then return the straight line of the path and so on ,
Here is a video where the wole group moves / rotates as a singel object (like a rectangular object )
[media]
[/media]

Hope this helps . Edited by Delphawi

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633767
• Total Posts
3013739
×