0 votes

I'm a complete noob to Godot and was going to make a snake game. I followed a few tutorials and got the basic mechanics down but one thing has always confused me. RIght now, I have a snake head sprite that isnt rotating based on the keyboard inputs. Basically the snake head moves the direction that the player inputs, but the head texture itself isnt rotating. And when I do set the rotation degrees in the code, it completely messes with the program and I think its because its rotating about a different axis than the center of the sprite. Anyone have a solution?

asked May 2 in Engine by kushal2011 (12 points)

And when I do set the rotation degrees in the code, it completely messes with the program and I think its because its rotating about a different axis than the center of the sprite.

What's your understanding of " completely messes with the program"? ;) How does your code look like? The centered-property of Sprites is true by default, meaning that rotating the Sprite will rotate around the center point.

1 Answer

+1 vote

rotation = velocity.angle() might help.

answered May 2 by Traumaticbean (30 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 How to use this Q&A? before posting your first questions.