Struct AnimatedSprite3D

2D sprite node in 3D world, that can use multiple 2D textures for animation.

struct AnimatedSprite3D ;

Animations are created using a SpriteFrames resource, which can be configured in the editor via the SpriteFrames panel.

Properties

NameTypeDescription
animation[get, set] StringThe current animation from the frames resource. If this value changes, the frame counter is reset.
frame[get, set] longThe displayed animation frame's index.
frames[get, set] SpriteFramesThe SpriteFrames resource containing the animation(s).
playing[get, set] boolIf true, the animation is currently playing.

Methods

NameDescription
_isPlaying
_resChanged
_setPlaying
getAnimation
getFrame
getSpriteFrames
isPlaying Returns true if an animation is currently being played.
play Plays the animation named anim. If no anim is provided, the current animation is played.
setAnimation
setFrame
setSpriteFrames
stop Stops the current animation (does not reset the frame counter).