navmesh or splines

I have a tile-based game and I want to simulate cars traveling.

I’m not sure if I should use

  1. splines for making cars travel between two points
  2. navmesh for making cars travel between two points

I’m also not sure if there are other alternatives.

I’ve watched a couple of videos on both but it didn’t really allow me to differentiate just yet.
I have noticed that since my level is created on game load, I don’t quite know how big to size the navmesh volume which means I’m already sort of stuff on that approach.

Plus there seems to be other bits in navmesh that seems overkill , i.e. grid sizes and I must do a lot work to make an area non drivable i.e. a road VS open space which according to navmesh is both (correctly) drivable.

there seems to be other bits in navmesh that seems overkill , i.e. grid sizes and I must do a lot work to make an area non drivable i.e. a road VS open space which according to navmesh is both (correctly) drivable.

Navmesh modifiers take care of that. Or block out the non drivable areas. Can be fiddly, indeed.

I have a tile-based game and I want to simulate cars traveling.

It does sound like you want to use splines but depending on the kind of path the cars are supposed to follow and the way they’d do it, you may want employ both methods simultaneously.

I had a system once where a spline was serving as an optimal guiding path that generated a dummy target for the car to chase over a navmesh. But there was no grid; not sure if that’d make sense.


Perhaps you could tell how the grid system meshes with the driving - or perhaps there is no driving, but the car travels without direct user interaction? How much autonomy is there? Splines would give you a somewhat rigid travelling method with fine control over the timing, while a navmesh would give you the chance to automate obstacle avoidance.

tyvm for the reply.

All of the cars are AI controlled, i.e. simulation like simcity and so on.
I’ve currently gone down the splines path but still having issues with recursion to calculate the road tiles.

Here is the plan roughly (whether it will work or if I could make it work skills wise is to figure out)

  1. Get route, this I can drive via ai controller or simpler
    2.Get source and target
    3.work out network (DFS \ BFS)
  2. create spline blueprint \ actor \ instance for route (non-loop)
    5.add spline points which looks like it takes location
    6.move vehicle along spline and have some event trigger vehicle stop \ park etc.

I’m not sure how I would go about making the car stick to left side of the road or not crashin g into other cars etc.