0 votes

School project:
Hello there! I currently creating my own 2D jump and run game and wanted to implement a attack mechanic. Basically I want my character to shoot at the point where Im aiming at with my mouse. I looked a lot of stuff online up and I cant find anything related to my problem. Would be nice if someone has some advices.

character shooting circle


in Engine by (12 points)

1 Answer

0 votes

you mean something like this: Look at mouse

by (1,963 points)

yes almost. Now whats there missing is a hidden circle on which a crosshair is applied to. So that you see where youre aiming at.

You could do when the distance_to from your player to the mouse position is less than X, show a crosshair.

thank you! I will try that out~

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.