Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Sprite3D
繼承: SpriteBase3D < GeometryInstance3D < VisualInstance3D < Node3D < Node < Object
3D 世界中的 2D 精靈節點。
說明
在 3D 環境中顯示 2D 紋理的節點。顯示的紋理可以是來自較大合集紋理的區域,也可以是來自精靈表動畫的影格。另見 SpriteBase3D,定義有公告板模式等屬性。
屬性
|
||
|
||
|
||
|
||
|
||
|
訊號
frame_changed() 🔗
當 frame 更改時發出。
texture_changed() 🔗
當 texture 更改時發出。
屬性說明
Current frame to display from sprite sheet. hframes or vframes must be greater than 1. This property is automatically adjusted when hframes or vframes are changed to keep pointing to the same visual frame (same column and row). If that's impossible, this value is reset to 0.
Vector2i frame_coords = Vector2i(0, 0) 🔗
顯示的影格在精靈表中的座標。這是 frame 屬性的別名。vframes 或 hframes 必須大於 1。
The number of columns in the sprite sheet. When this property is changed, frame is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, frame is reset to 0.
如果為 true,則該精靈會使用 region_rect,只顯示紋理中的指定部分。
Rect2 region_rect = Rect2(0, 0, 0, 0) 🔗
要顯示的合集紋理區域。region_enabled 必須是 true。
要繪製的 Texture2D 對象。如果使用 GeometryInstance3D.material_override,則這個屬性會被覆蓋。仍會使用尺寸資訊。
The number of rows in the sprite sheet. When this property is changed, frame is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, frame is reset to 0.