How to create a growing hitbox

Godot Version

4.3

Question

` I’m trying to create a hitbox that grows frame by frame alongside a Sprite2D

The hitbox is a circle
in _ready() an initial radius value is set
an incrementing value variable is set
in _process the value is incremented by $CollisionShape2D.shape.radius += increment_value

Despite this, the hitbox doesn’t appear to change ingame and remains at its initial value`

The most probable reason I could think of was the collision shape not updating. Try and see if this solves it:

func _process(delta):
var shape = $CollisionShape2D.shape
shape.radius += increment_value
$CollisionShape2D.notify_property_list_changed() # Forces an update