Why isn't my sprite's CollusionShape2d not changing horisontally in Godot
11:40 19 May 2024

The AnimatedSprite2d is changing horizontally but the CollusionShape2d isn't, here is the code:

if direction == 1:
        $AnimatedSprite2D.scale.x = 1
        $CollisionShape2D.scale.x = 1
    if direction == -1:
        $AnimatedSprite2D.scale.x = -1
        $CollisionShape2D.scale.x = -1

How can I fix it?

I tried changing it to flip.h but it threw me an error that it was out of scope, also my collusion shape is a rectangle.

2d gdscript godot4