The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

Im using free assets to use in my game, and im trying to figure out how can i "cut" a part of the spriteset (?) , im new into game dev and its a project for school. I just want to get the player model so i can animate

i just want to get one of the frames so i can use in the animated sprite heres the link of the image
Sry guys if im confusing im really new to godot and game making in general x)

in Engine by (13 points)

Hi, Your Talking about using Spritesheets to make an animated sprite, this is something Ive had difficulty with myself.

1 Answer

+2 votes

Instead of directly using the spritesheet, you can create AtlasTextures.
An AtlasTexture is a special kind of texture that only references another one with an optional sub-rectangle.

So yes, you can use spritesheets with AnimatedSprite, but currently the UI isn't very friendly to do so:
You need to create one AtlasTexture for each frame of your animation. Create from the inspector, set them to use the spritesheet and choose which sub-rectangle to use, then save as a file (frame1.tres, frame2.tres etc for example).
Then, you'll be able to use them in your AnimatedSprite just like regular textures.

Another way is of course to manually cut your spritesheet in an image editor. It depends which alternative you prefer.

You can also just not use AnimatedSprite and use Sprite directly, by playing with the hframes, vframes and frame properties which you can animate either by script or by AnimationPlayer.

Related Q&A posts:

by (29,360 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.