The things in the java app are actually quite simple to do.

You just need to use several traces in predefined direction, and
give the entity a moveforce oposing them, when the traces detect a wall.
The closer the wall is, the more force (up to 100% counterforce when at the wall).

The trick is to move then entity before the "normal" collision detection itself forces the entity to stop.

This way entites can easily avoid obstacles and other entities,
and get back onto the path.

The path itself can then be more rough (the positions to
follow as given by the pathfinding).

You can use the intenseX pathfinding for example for the general path to follow,
but you need to make a more sleek obstacle avoidance,
as (given the Demo) IntenseX does not perform
very well in that point.


No rocket science. But still rarely seen in the projects here.

Last edited by Oxy; 07/14/08 21:56.