0 votes

I want to create a game about a railway road, there will be different types of rails on which the train will ride. Each rail is part of a track. I need rails that would be close to the other end of the rails to be magnetized and create a path. As a result, so that you can create a closed path.

Godot version 3.2.3.stable.official
in Engine by (159 points)

what part of this task is blocking you?
path2d curve is fairly easy to fill with new points using add_points(), you can add a new point each time a new "piece" of track is laid down.

and for the "magnetized" part: for each piece of the track you could specify some points around them to use as snapping point, when a new piece of track is close enough to one of this points, you could move it using a Tween (and you could link the tween completed signal to the add_points())

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.