The godot docs state:
Be careful to never scale your collision shapes in the editor. The "Scale" property in the Inspector should remain (1, 1). When changing the size of the collision shape, you should always use the size handles, not the Node2D scale handles. Scaling a shape can result in unexpected collision behavior.
I have a sprite that changes size during the game. As it changes, my code scales the collision shape to match.
I have a list of scales:
const COLLISION_SCALES = [
Vector2(3.2, 3.2),
Vector2(6.4, 6.4),
Vector2(25.6, 25.6)
]
Then I can re-size the collision shape like this:
$Collision.scale = COLLISION_SCALES[index]
But I'm wary of the warning the documentation gives. Does the warning apply to the scale
property as it does to the handles in the gui? Also, what might that unexpected collision be?