I would like to set a progress bar to the size of a sprite's width. I had this working in 2.1, but don't see how to do it in 3.0. Any ideas?
var sprite = _my_entity.get_node("RigidBody2D/CollisionPolygon2D/Sprite")
var parent_size = sprite.get_item_rect().size
#x and y are reversed on the bodies, so reverse them here too
var size = Vector2(max(parent_size.y,50), bar_height)
var pos = Vector2(-size.x/2, -parent_size.x/2 - bar_height - bar_margin)
I know how to get sprite size:
$KinematicBody2D/Sprite.texture.get_size(), but not how to change Progress Bar size