[SOLVED] Rotating object issue

My rotating object is 20x40px. I changed the center point to x=10, y=0, but my object rotates considering x=10, y=40 (middle bottom). Why?
I used rotate toward player.

Try x=10 y=20 so is in the center of the object like with/2 height/2

But I want my point on top center, not in the center.

Ah! ok when I have to do this kind I use two object one as reference point and then the object to rotate place the obj_reference at some x/y position in the game then position the object do you want to rotate at obj_reference posX,posY and add rotate toward object, I don’t know if this is the best way to do it but it works for me.

Look another approach

Just to clarify here, I believe rotation is based off the origin, not center, point. Center is for flipping.

I already tried to modify the origin but it doesn"t work either. Tomorrow I’ ll try what Ulisses suggested. Thanks for now friends!

Just wondering, it the yellow dot at 10,0, and the image is upside down? It may be easier to see what’s going on if you change your red rectangle to something like an isosceles triangle (not an equilateral one) or an arrow.

Maybe I am completely off the topic/problem but you mention in your first posting that you set the point to x = 10, y = 0. In the screenshot you write that you set the point to x = 0, y = 10. I don’t know how you set up your sprite, but in your case for rotation it should be horizontally aligned, facing east and the pivot should be in the west (x = 0, y = 10).

1 Like

The problem is the image is not upside down. But it act like it is. I tried to flip it vertically but it doesn’t work.

you need to set the origin point as your rotation axis. do not modify the center.
also your sprite must face to the right.


1 Like

Yesss!! I would never imagine the way you draw your object (vertical / horizontal) could interfere on rotation behavior. Thanks Sledge