0 votes

Hi all, a little confused/curious about a little something I'd like to get working.

I've got a scene{Node called "TouchAreas"} with three Area2Ds, each with their own CollisionShape2D. This scene is being instanced in the main scene. I have a turret that rotates on input, and would like for the player to be able to turn it when they click in the respective Area2Ds {"UpArea" and "DownArea"}.

in Engine by (197 points)

I'm trying to understand what you exactly want. So when the player clicks on the Area2Ds, the turret will turn? When they click on "UpArea", the turret turns upward? You want the player's input to affect the turret in this fashion? Is this correct?

If that's the case, you can use a signal to connect the Area2D to the turret's node.

Btw, how is this question different from the question you asked yesterday? If this is a continuation of that question, then please restrict it to that thread.

I'm afraid I couldn't understand the answer, and wasn't sure how to add it to my code.

Ask rojekabc (the one who answered your question) to clarify their response.

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.