0 votes

Hey all, I'm new to using Godot, and I'd like a little assistance in putting together some things. Namely, a magnetic mine that follows the player when the enter an Area2d (named "DetectionArea", though it also would be the tracking space.)

How can I apply a thrust to the "Mine" so that it tries to get to the player's ship?

in Engine by (199 points)

Is "DetectionArea" subnode of magnetic mine? If it is, then check is Player entered DetectionArea of magnetic mine with corresponding signal bodyentered( ) . Then apply force in direction of a vector between mine and Player ("angleto" function of Vector2 class).

I think I got it figured out. Thanks, pospathos.

Hi, could you please post your solution and mark it as the best answer? so other people with same question see it's resolved and can read the solution. Thanks!

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 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 webmaster@godotengine.org with your username.