Support for directional movement modifiers?

Hi yall :slight_smile:

I have a map with a convetor belt running down the middle of it.
The belt speeds up creatures that move along it in one directoin, but slows down cratures that move along it in the opposite direction.

How can I make pathfinding take this into account? Have creatures use the conveyor when moving in one direction, but avoid it when moving in the other direction?

Thanks ~~~

Just wanted to follow up on this post from a few years ago as I couldn’t find other related resources on the forum.

I was personally working on identifying a solution to pathfinding where forces are applied to entities moving, think content like wind, conveyors, moving platforms. From a bit of theorycrafting I can think of a few ideas for solving this:

  1. In a GDC Talk on Death Stranding, they mentioned adding entry and exit costs when crossing nodes. I imagine this combined with dynamic directional costs for crossing from one node to another node in a certain direction would help.
  2. Another possibility is using a directed graph, basically treating the area as a ladder where agents can only move in one direction along points in this graph.

Any advice from anyone that’s approached this?

I think this simpler than it seems; you can just update the position property on the built-in movement scripts additively. I double checked and yeah it works pretty cleanly.

This was all I did:

follower.position += directionToMove * Time.deltaTime;