Pre-purchase Question: Options for avoiding other A* units? Able to return direction?

Hi, I think I’m going to grab this asset while it’s on sale, but I had a few questions;

  1. Can I have units try to avoid other similar units? When making my game I want my enemies to naturally avoid clumping up when pathfinding, but I’ve seen no options for this; is this what Local Avoidance is meant to accomplish? I didn’t gleam much from the video on it.

  2. Can I return the direction the unit wants to go as a Vector3? I want to be able to mix my current movement with this asset.

(I see there are already other pre-purchase questions about local avoidance, but they didn’t answer my question) Thanks in advance.

  1. Local avoidance is used to avoid similar units. It’s decently good at this, but might not be optimal for fast-paced games.

  2. Depends on how you want to integrate it with your own movement. You can either write a custom movement script (see docs), or you can override the current movement (IAstarAI - A* Pathfinding Project) or you can just get the desired direction for the built in movement (IAstarAI - A* Pathfinding Project).

Thanks for the fast reply!

So, when you say it’s not optimal for fast-paced games, what do you mean? What are it’s drawbacks on this regard?

And, does steeringTarget work similarly to Unitys NavMesh’s ‘path.corners’? With the corners variable, it’s an array, and what I was doing now was grabbing the first Vector3 in the array, which I’m assuming is the same as what steeringTarget is?

It’s geared more towards crowd simulations, not e.g. action games. Agents can sometimes take more time than strictly necessary to move around each other.
Here’s another demo video (though this one uses some extra features only available in the beta version): RTS Demo - YouTube

If you want an array of points similar to path.corners, you might want to write your own movement script instead. Take a look at Writing a movement script - A* Pathfinding Project. Then you will get the path and have full control over what to do with it.
The steeringTarget is not necessarily a corner, but it will be a point on the path.
See the image at AIPath - A* Pathfinding Project for more details.

Hm, I see. So it looks like I’m not getting out of rewriting my enemy movement code. Thanks for the information! I think I’ll be picking this up, it seems like a very helpful tool to help craft the movement I’m looking for.

1 Like