Zebbi
You could try to tune the parameter of bullet behavior (max speed, or max rotate angle), then find out that the LJpotential behavior won't work well anymore. It needs tune the parameter A,B,m,n, too.
A possible solution is,
1. tune the behavior of the target object (bullet behavior in this case)
2. tune the parameter A,B,m,n of LJpotential behavior to match your requirement
Yes, that's the hard part, I barely know what I'm adjusting with LJ! Is there some alternative to using "rotate 10 degrees"? I tried an anglediff idea, but it didn't work either.
Cool!
Are you using bullet for the boomerang/knife?
I am thinking when it hits an obstacle have it arc upward like a boomerang would and that would give it a better chance to find a path. Maybe make it move back along the X coordinate until it finds that path.
Not sure how your obstacles will be arranged but looks like if it goes up after a collision it will find a path back.
I'm using the car, as it had a good built-in bounce and turned nicely when you use a second object pinned on top to disguise the angling of the sprite. It's just hard to find a decent way of finding it's way home in a highly dynamic way (since pathfinding tends to be turn-based.) If I could work LJ out, it should be perfect as I could reject the solids, but I'm awful at setting it up properly, and the only reason my first example (and the gif) looks that good is because it didn't hit any solids!
Any boids experts want to have a go?