animate a character

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CaueHenrique

How can i animate a character from a sprite sheet? The only tutorials i found on youtube was using a lot of images, there is a way to do an animation using just one image with sprites?

Sprite Sheet

What node should i use? Animated Sprite or Sprite with AnimationPlayer?

:bust_in_silhouette: Reply From: kidscancode

Sprite with AnimationPlayer.

Set the sprite sheet as the Sprite’s texture, then under the “Animation” section in the Inspector set HFrames to 4. This will slice the sheet into the four individual frames. Changing the Frame property will select a frame. Then you can use AnimationPlayer to animate that property.

See the Intro to Animation doc for details on using AnimationPlayer.

Does this also work with 3D once like 3d players

3dart | 2018-11-17 17:09