The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

What is the best way to implement waypoints?...I'd need "fire" waypoint from a boat at a certain distance ( image bellow ) and change boat rotation ( and speed) in every "shooted" waypoint for the possibility do the corners.
Thank all for help
enter image description here

in Engine by (451 points)

2 Answers

+2 votes
Best answer

For this case, maybe a Path2D can help, then you can use a PathFollow2Ds to set the position of the waypoint areas changing the offsets, should be easy to edit this way.

You can do this with a single PathFollow2D too or just using the curve and some points/distance you set in another way.

by (7,890 points)
selected by

Thank you very much eons,
and that's the great solution...any chance how I get the position of the individual Path2D points...
i'll get to them?......i thought it could be ( Path2D points ) directly as a target for a boat or spaceship and waypoint for rotation(faceing) and changing speed...just an idea......more on image bellow

enter image description here

If you use PathFollow2Ds you can get a position when changing the offset.

If using just the Path2D, you will need to work on the Curve2D (get_curve).
You can get a point position or the position based on an offset (distance from the origin of the curve), I think all the points on the curve are relative to the Path2D, so, keep that in mind when checking position.

Look at the Curve2D documentation for more details

Thank you very much eons....I will go this way

0 votes

either an array of vector2 positions or place a bunch of node2ds and iterate through them :)

by (290 points)

Thanks , I have this ,but I'm still looking for another and maybe a better solution like spawning "shooting" waypoints from boat.
enter image description here

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.