Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
SpriteBase3D¶
Inherits: GeometryInstance3D < VisualInstance3D < Node3D < Node < Object
Inherited By: AnimatedSprite3D, Sprite3D
2D sprite node in 3D environment.
Description¶
A node that displays 2D texture information in a 3D environment. See also Sprite3D where many other properties are defined.
Properties¶
|
||
|
||
|
||
|
||
|
||
Vector3.Axis |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
generate_triangle_mesh ( ) const |
|
get_draw_flag ( DrawFlags flag ) const |
|
get_item_rect ( ) const |
|
void |
set_draw_flag ( DrawFlags flag, bool enabled ) |
Enumerations¶
enum DrawFlags:
DrawFlags FLAG_TRANSPARENT = 0
If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible.
DrawFlags FLAG_SHADED = 1
If set, lights in the environment affect the sprite.
DrawFlags FLAG_DOUBLE_SIDED = 2
If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
DrawFlags FLAG_DISABLE_DEPTH_TEST = 3
Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
DrawFlags FLAG_FIXED_SIZE = 4
Label is scaled by depth so that it always appears the same size on screen.
DrawFlags FLAG_MAX = 5
Represents the size of the DrawFlags enum.
enum AlphaCutMode:
AlphaCutMode ALPHA_CUT_DISABLED = 0
This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
AlphaCutMode ALPHA_CUT_DISCARD = 1
This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as alpha testing or 1-bit transparency.