I'm trying to code a Puyo (two circles next to each other) and need the size of the sprite so I can place the second circle right next to the first circle.

This was my first attempt at it:


There's more code below this, but it has to do with the movement of the Puyo.

This code worked, except the Puyo's collision detection didn't work, whereas the collision detection for circle.tscn did.

My guess was that I needed to load circle.tscn into Puyo.gd, instead of loading redcircle2.png. So I rewrote puyo.gd as follows:

extends Node2D

const PUYO_SIZE = 0.5
const GRAVITY = 100



var plpuyo1 = null
var puyo1 
var puyo2 
var plpuyo2 = null
var rotate_state = 1

func _ready():
	# Create the first Puyo and add it as a child of the main scene
	

	plpuyo1 = preload("res://Circle/circle.tscn")
	var puyo1 = plpuyo1.instantiate() # create a new scene tree from the PackedScene
	puyo1.position = Vector2(100, 100)

	scale = Vector2(0.5,0.5)
		
	var global_transform = get_global_transform()
	var tree = get_tree() # get the active scene tree
	var size = tree.get_root().get_size().y # get the size of the root node of the current scene

	add_child(puyo1)
	
	# Create the second Puyo and add it as a child of the main scene
	puyo2 = plpuyo1.instantiate() # create a new scene tree from the PackedScene
	puyo2.modulate = Color(0, 1, 0)
#	puyo2.texture = preload("res://redcircle2.png")
	puyo2.position = Vector2(100, -size)
	add_child(puyo2)

This fixed the collision detection, but the circles in my Puyo are now spaced too far apart.

What's the correct command to get the size of the circle from circle.tscn after it's been scaled?

Thanks