Creating a Path2D node that follows a player.

Godot Version

4.2

Question

I’m working on a project in which I need to spawn entities at a set distance from the player. To do this, I’m trying to have the entities spawn on a path very similar to the Your First 2D Game tutorial, and so far I have gotten that to work, but I can’t get that path to move with the player. Ideally, I’d have the path move just like the camera does, so that no matter where the player goes, the entities spawn a fixed distance away.

You could use a RemoteTransform2D or child the path to the player