Moving platform


Me and my team are currently working on a game with two characters, both using pathfinding to get around (top down, click to move).

It’s a puzzle game, so we would like there to be floating platforms that are triggered to move by pressing switches.

  1. We’re having trouble implementing this and wonder if there is are best practises to consider?
  2. Which graph type would be our best starting point?
  3. Is there any way to scan the graph without an FPS penalty with a larger grid (1500x1500)?



That’s pretty tricky. If the agents don’t need to consider “take this moving platform to the other side” as part of the pathfinding algorithm, then I’d just recommend using a grid graph and attaching the DynamicGridObstacle component to the the platform. You can find an example of it in the Terrain2 example scene.