AnimatedSprite3D

Inherits: SpriteBase3D < GeometryInstance < VisualInstance < Spatial < Node < Object

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

Description

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

Methods

boolis_playing ( ) const
voidplay ( String anim=”” )
voidstop ( )

Signals

  • frame_changed ( )

Emitted when frame changed.

Property Descriptions

Default"default"
Setterset_animation(value)
Getterget_animation()

The current animation from the frames resource. If this value changes, the frame counter is reset.


Default0
Setterset_frame(value)
Getterget_frame()

The displayed animation frame’s index.


Setterset_sprite_frames(value)
Getterget_sprite_frames()

The SpriteFrames resource containing the animation(s).


Defaultfalse

If true, the Animation is currently playing.

Method Descriptions

  • bool is_playing ( ) const

Returns true if an animation is currently being played.


  • void play ( String anim=”” )

Plays the animation named anim. If no anim is provided, the current animation is played.


  • void stop ( )

Stops the current animation (does not reset the frame counter).

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.