+1 vote

I have a 2d character with ranged weapon. I want it to aim to the position of the mouse (like for example, aiming in worms game, but with mouse). My question is, how can i make arms and head look at mouse but remain rest of the body on idle?

I was thinking in adding 4 sprites to my kinematicbody2d, one for each arm, one for head, and one for the rest... then aply rotation to arms and head acording to mouse position. Is this the correct way to do so?

I'm new to godot engine.


in Engine by (3,485 points)

1 Answer

+1 vote
Best answer

The arms wouldn't really need collisions but yes the idea is that the arms would be separate from the body; at least if you want a worms style game.

Take a look at the Godot 2D movement overview to get some idea of what your options are for rotating the arms.

You could also use animations and many other tricks.

by (1,490 points)
selected by

Thanks a lot!
I'll go with sepparate parts for the body then... i just wanted to know if it was a good idea or not! Thanks!

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.