Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Sprite2D

Inherits: Node2D < CanvasItem < Node < Object

General-purpose sprite node.

Description

A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.

Tutorials

Properties

bool

centered

true

bool

flip_h

false

bool

flip_v

false

int

frame

0

Vector2i

frame_coords

Vector2i(0, 0)

int

hframes

1

Vector2

offset

Vector2(0, 0)

bool

region_enabled

false

bool

region_filter_clip_enabled

false

Rect2

region_rect

Rect2(0, 0, 0, 0)

Texture2D

texture

int

vframes

1

Methods

Rect2

get_rect ( ) const

bool