0 votes

I am new to the engine! As an exercise, I am trying to create a walk animation using this spritesheet, but I cannot change the frames. Can someone walk me through how to create an animation for walking down? The spritesheet for this action begins on the fifth row, and spans 4 columns.

Here is what I've done:

Node2D
  |-- Sprite
  |-- AnimationPlayer

For Sprite I have loaded that spritesheet png with the following settings:

Vframes: 1
Hframes: 1
Region: ON
Region rect: (0,0,32,32)
Scale: (.5,.5)

Everything else is default. On the Sprite, I do "Create New Animation" and give it the name walk_down.

Now a key icon with a plus sign shows up in my Inspector for the Sprite (next to Frame input), and clicking it brings up "Create NEW track for property 'frame' and insert key?". I click Okay and a new track is created in the animation editor.

However, I cannot change the frame number. It's set to Frame: 0, but I need the animation on the 5th row and its four 4 columns for the walk down animation. Clicking on the arrow up and arrow down, or manually setting the Frame to a number with the keyboard does nothing. It's always displaying 0:

It always displaying 0

What have I done wrong? Why isn't it pointing to the correct sprite image? Can someone walk me through creating an animation for walking down with this spritesheet?

in Engine by (20 points)
edited by

1 Answer

+1 vote
Best answer

You need to set the Vframes and Hframes to tell Godot how many columns and rows are in your spritesheet.

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

Categories