Issue with rigdibody2d with scale x set to -1

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Vrzasq

I have an issue with rigibody2d when transform scale x is set to -1. It flip my sprite upside down.

The demo scene is setup as show on the picture below:
enter image description here

Basically left unicorn is duplicated version of right unicorn with rigidbody2d scale x set to -1. When I play the scene the left unicorn if flipped.
enter image description here

Is that a expected behavior or there is something I don’t get with an engine ?
Or it is a bug and I should post it on:
Issues · godotengine/godot · GitHub ?

What version of Godot are you using? In Godot 3.1 those work as expected. Maybe it is a bug after all.

johnygames | 2019-08-23 18:06

I use version 3.1.1. It happens also when I wrap rigidbody2d with node2d and change x scale on that. When I flip sprite only i does not flip collision shape, example on picture

enter image description here

Vrzasq | 2019-08-24 07:37

:bust_in_silhouette: Reply From: johnygames

I think I figured it out. I do not know why it’s doing that, but I know how you can avoid the issue. You should not be using the Scale method of the RigidBody. Use the sprite’s Scale method instead. It will work as expected. By the way, is that… is that horn… what I think it is? XD

Aye but that way I need to redo my collision shape. Seems like bug to me, issue raised
Issue with rigdibody2d with scale x set to -1 · Issue #31622 · godotengine/godot · GitHub

Vrzasq | 2019-08-24 08:10