# Techniques of dodging/path planning

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

## Recommended Posts

Hi, If I have an infrastructure in the scene, there are poles and racking systems and many others, how do I ensure that say the worker won't walk into the poles and stuff like that? Thanks a lot Jack

##### Share on other sites
hmm... Wrong forum I think - I'll punt this over to AI for you [smile]

You'll need to be more specific about what information you have - solving these problems is usually much simpler once you clearly and precisely define the problem space.

At a guess, some sort of graph based approach might be sufficient. If you can pre-process your scene to generate a graph of where workers can/can't move then you're most of the way there. You can add one of the many path-finding algorithms (e.g. A*) on top of that in order to get your workers to move around obstacles accordingly.

hth
Jack

##### Share on other sites
If the obstacles are small enough when compared to the free space around them,
you can ignore them in the pathfinding, then use simple collision-avoidance behavior when following the path.

##### Share on other sites
Quote:
 Original post by jollyjeffersYou'll need to be more specific about what information you have - solving these problems is usually much simpler once you clearly and precisely define the problem space.

Yep, that's because: Problem's imply Solutions.
given problem X
solution = !X

##### Share on other sites
Quote:
 Original post by Anonymous PosterYep, that's because: Problem's imply Solutions.given problem Xsolution = !XAdd this to FAQ?

I think you meant to say something like:
given problem X and constraints C, find a solution X-1 such that
X-1X=C

Of course, that would only be possible for a very limited class of problems. ;)

##### Share on other sites
Off topic:

I don't think that fits in the FAQ [rolleyes].
Solutions imply problems (it's not a solution if it doesn't solve a problem), but problems don't necessarily imply solutions. Cold fusion is a problem, but there aren't and will be no solutions... Unless some major revelations come out.
Also, the solution to a problem isn't simply 'not the problem'. Given a question, anybody can negate it, but not everybody can solve it. It's much closer to what Timkin said.

On Topic:

Some form of collision detection is necessary for this. The simplest, but most CPU-intensive method would be determining mesh intersections. Usually some constraints can be laid out so that the collisions can be projected to fewer dimensions. In this case, a new way of representing the environment would be useful. Tell us more if you're still around.

Regards

##### Share on other sites
Do the structures exist before the game runs, or are they dynamically placed by the user?

-me

##### Share on other sites
OFF Topic

Quote:
 Original post by TimkinI think you meant to say something like:given problem X and constraints C, find a solution X-1 such thatX-1X=COf course, that would only be possible for a very limited class of problems. ;)

Ok, you've got a good point there.
Even so, I think that a large portion of those limited classes of problems, tend to be the kind that (forgive the term) newbies ask a lot of. Hence the merit of adding it to a faq.

for example: 'I'm building a terrain with a vehicle driving across it but it keeps falling through the floor, what do I do?'(real past example)

answer: Program it to NOT go thorough the floor. (It's blunt, and rude, but it's also very true, a simple 'if below floor, then go above floor', totally suffices and follows directly from the advice)

I think it's really a question of confidence, too many people with problems like this forget that They are the Programmer, and don't take the time to think about what solutions their problem might imply...

Sorry for the OffTopic
but if you look at what I said and clean it up to be less arrogant and rude it *might* have a valid point to be remembered
END

##### Share on other sites
ON Topic

Are all your obstacles convex? -no dents or 'pockets' that your character might walk into and get trapped?

If everything's convex you can just get away with walking right into stuff and sliding around to one side.

To make it look less 'dumb' you can even make those obstacles invisibly larger and slide around that invisible border instead, so it looks like an intelligent early avoidance.

##### Share on other sites
OFF TOPIC

lol i know thats not what u were refering to.

1. 1
2. 2
3. 3
Rutin
17
4. 4
5. 5

• 14
• 9
• 10
• 12
• 17
• ### Forum Statistics

• Total Topics
632906
• Total Posts
3009155
• ### Who's Online (See full list)

There are no registered users currently online

×