RTS type pathfinding - moving groups of units

Hi,

I am struggeling with RTS style movement using Unity’s NavMesh and am wondering if your free or PRO solution provides a easier way to manage this. Is there any kind of demo, documentation or tutorial on the subject? :slight_smile:
Thanks!

Aron is working on an RTS demo, it’s currently in beta and only available to pro users.

Thanks,

I just found the thread with 80 responses which basically follows the development of it :slight_smile:

One thing I could not gather, does my game need to use job/burst system to use it, or do I just need to be on a version of Unity that supports it? I have no intention of using job/burst system in my own game/code, but don’t mind if it’s used in the background of this package.

Since it’s quite a lot of money I’ll wait until there is a proper demo showing what it can do, and make sure it can actually run on non-ECS projects.

You do not need to use the job system/burst at all (in fact that is not that well supported right now). The local avoidance system uses burst under the hood but does not expose this fact.

Cool, just bought the pro version so Ill try to help out w testing RTS as much as I can!

1 Like

I have spent a few hours looking at the RTS example now and the results are very nice!

I am wondering, will there be some sort of tutorial on how to set up this type of stuff from scratch? I am not a big fan of copy/pasting code that I don’t understand, and the code in the RTS example is a bit overwhelming :slight_smile: I am going to try to recreate it on my own, I’ll see how it goes!

Hi

Glad you like it.

Eventually yes.
The actual movement part is not particularly long though. It’s mostly in RTSUnitManager.MoveGroupTo.

Yeah I saw that now. Does it mainly just use RVO? I can find a few tutorials on the RVO system, so could start there then :slight_smile:

It uses RVO but I wouldn’t say mainly. RVO is used for the fine grained local avoidance but it obviously uses pathfinding on top of that and also some formation code on top of that.

1 Like

When I used the free version I used Grid Graph, where I registered a layer mask for obstacles. Using the recast graph (used in RTS example) I cannot find this option, how do I register unwalkable areas?

Hi

With the recast graph you usually just give it everything and it will figure things out by itself.
If you explicitly want to make an object’s surface unwalkable you can attach the RecastMeshObj component to it.

1 Like

Another strange thing I noticed, you can see it here. They do not choose the shortest path, makes them seem a bit dumb :smiley:

This might be me doing something stupid, but what if I have a scenario where I want to have units walk around trees, rocks, etc. BUT, I also want the ability to go to these trees to chop them down, which would result in this:

Screenshot_1

i.e, the agent cant reach the destination. Is my only option to create a child of the tree that I can put a bit outside the unwalkable area, and use as the “chopping-position”? Or is there some smarter way?