- Edited
In my case nothing seems to work,
nothing is drawn on screen, only an error on the debugger
E 0:00:01:0001 blit_not_working.gd:11 @ _ready(): It's not a reference to a valid Image object.
extends Node2D
var texture2
var image1 = preload("res://imgTest1.png")
var image2 = preload("res://imgTest2.png")
func _ready():
var img = Image.create(200, 200, false, Image.FORMAT_RGBA8 )
img.blend_rect(image1, Rect2i(Vector2i.ZERO, image1.get_size()), Vector2(10, 10) )
texture2 = ImageTexture.create_from_image(img)
func _process(_delta):
queue_redraw();
func _draw():
draw_texture(texture2, get_global_mouse_position() )
Iam using Godot_v4.2.1, had to delete a bunch of code...
I though "blit_rect" was the one that combined images into 1 ? But still i cant understand how this is supossed to work... Is an image being created, then sprites are blit/blend into that image... Why isnt it writen on the manual i can even get 1 to work, blit/blend is massive pile of st