Pathfinding with moving aim
I'm working on a game at the moment where a bird follows a little flea. (We control the flea and the bird is the enemy. I want to make a Booga-Boo remake.) I could do that the bird follows the flea, but I want to do that it by-passes obstacles. Can I do this with the Pathfinding object? Please help me, or I'd be happy if you could recommend something as an example.
Thanks a lot!
:)
Re: Pathfinding with moving aim
Depends. Are you using 360 degree angles (or atleast 32 directions)?
Re: Pathfinding with moving aim
I use yet 32 directions, but I can switch to 360 degree, if it is better.
Re: Pathfinding with moving aim
The pathfinding extension only supports 8 directions (which is why I never use it) so what I usually do is just have the enemy turn away from the obstacles by using detectors that are attached to the object, so when the one on the right hits an obstacle, make it turn to the left, and so on. Then, when the detectors aren't hitting any obstacles, make the object look at the object it is trying to get to.
It doesn't sound like it would work very well but it does.
Re: Pathfinding with moving aim
Thanks! This is very important for me, because I had some problems: for example the bird simply went through the obstacles, although it should have stop.