+1 vote

Hello,
I want to make my player sword rotating (and attacking) like in Archvale game (easy to find on youtube),
but i can't manage and maybe someone can help me to find how it works :)
thank you for the help

in Engine by (15 points)

2 Answers

0 votes

I dont found videos of the attack mentioned. But, if I understand your question you can do this:
Create a Position2D as a child of the player node and put in the center of the player.
Create a Sprite, for example, with the sword texture as a child of the Position2D created previously.
Put the Sprite in the initial position.
Create a AnimationPlayer and chage the rotation of the Position2D.

by (171 points)
0 votes

The answer to this question is exactly what you are looking for:
https://godotengine.org/qa/116981/object-follow-mouse-in-radius

I was struggling to find an answer myself, so I might as well help any other stragglers out there, even if I am rather late to the question : )

by (14 points)
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.