stick-the-quick/vfx/SameSizedSubViewport.gd

11 lines
268 B
GDScript

class_name SameSizedSubViewport extends SubViewport
@onready var parent_viewport := get_parent().get_viewport()
func _ready() -> void:
parent_viewport.size_changed.connect(_resize)
_resize()
func _resize() -> void:
size = parent_viewport.get_visible_rect().size