Sprite rotation

Hi everybody.

First post.

I am using Gdevelop since one month and I find it really nice. Wonderful software !

I am trying to deepen my knowledge by developing a car race (here’s the tutorial I am following:
very nice tutorial, by the way).

So here’s my problem. I have my car sprite which has 2 animations:
one static
and one that simulates a rotation.

When I preview this rotation, it works just fine but during the game it has a strange behaviour.
I send as attachment a simplified file that shows the problem (just press spacebar).

What should I do ?

Thanks in advance.

NB: I am using Lubuntu.
test.zip (120 KB)

You have to place the Origin point where you want the car to rotate around, in the four animations, for example set the Origin on the car’s center :slight_smile:
You can make it without four animations, but with the animation where the car is “looking” at the right. Then change the car’s angle. With this method you have to modify the Centre point instead the Origin (the Centre point is automatically placed at the centre of the sprite), and you can set any angle :wink:

Hi !

I’l try the method without the animations: I think there’s a bug in Lubuntu because I can modify the center of the car but the software doesn’t save the modifications…

You need to change the “Origin” point, not “Centre” point. :wink:

It works!
Thank you.

I think there really is a bug in the Ubuntu version because it seems to be impossible to save the modifications of the origin point. I had to use the Windows version.

You need to explicitly select the origin point the point list before editing (no points are selected at the beginning).