Avoiding other units without using pathfinding

Started by
25 comments, last by bot_hot_dog 1 week, 4 days ago

Here is how i find the longest and shortest lines in blueprints, maybe there's a better way but this is the first draft:

Advertisement

Seems like a lot of work for a steering behavior. One of many videos on the topic. Following a path is just moving from node to node on your path, and getting around barriers is if you're blocked pick a point around a bounding box of the blockage.

Sure, you can go more complex like this, but it generally isn't needed.

I fixed the blueprint to find the longest distance so only one distance is shown the longest distance, its not perfect if you fire at the wall they all show up idk why but testing on angles walls it shows up:

I had a bug in my previous version, this version the bug is fixed.

There was another bug that was not being able to use the “hit actor” once the distance was measured so i fixed that with the blueprint i will upload now, the difference with this blueprint is it finds the closest distance which is good for exploding drones in the game, to find the longest distance just invert the compare signs:

I must have made a mistake before where i couldn't use the hit actor, now i can, so i will share the working blueprint. sorry for the confusion.

Advertisement