Sprite rotated 180° = Draggable Behavior bugged

Hi guys!

GDevelop5 is amazing and I would love to contribute with some bugs I have find in these 3 days, since I knew GDevelop 5.

Today I will show you a bug with the Draggable Behavior when a sprite is rotated (180° in my case).
When the sprite is rotated 180° (I did not test other angles), the draggable only works when clicking+dragging in the down part of the sprite. If I try to drag since the top-half of the sprite, it doesn’t work.

I did a video to show you the problem.

Can you reproduce this bug?

I hope it can be solved in a future update!

In my case, I will put another image (inverted) and no problem for me.


1 Like

did you try adjusting the hitbox?

1 Like

But when I rotate 180 degrees, the hitbox still the same, since my image is simetrical. Is not it? Or I am missing something?

No, works fine for me.

Try it outside your project, maybe something else is responsible.

https://we.tl/t-mVlFzY3ceQ Have a look in this file I have reshaped the hitbox it works fine :blush:

Note the draggable behavior use the AABB collider, in other term it dosen’t use the collision mask.
That mean if you click on your sprite, you can click inside the grey rectangle, you will be able to move the sprite.
If the pivot point is moved, the AABB box is always on the sprite, don’t trust the blue box for resize, this box have no support for pivot point/rotation.

So the AABB collider for draggable behavior is still on the grey rectangle.
About 180degree it’s works correctly for me., the sprite Above have 180d and pivot point on left side center.

Draggable behavior need a polish for support custom mask.
And the gizmo for rotate/scale/position need to be improve, it’s very basic for now.