Weapon aiming offset issue

So, my sister likes to draw pixel art but the weapons she draws are at a 45 degree angle.
When I put them into a scene with the idea to have them point and rotate with cursor x and y the weapons aim is offset to the cursors position. See screenshot. Black cross is cursor
I’m using this bow but it doesn’t point at the cursor properly.
I’ve tried to rotate the sprite in the instance properties and tried it in the events also but doesn’t work.
I kinda understand why this doesn’t work and to fix this I’d need to rotate the original image in an editor but doing so will change its shape and how the pixels are and that isn’t what I want.
I’d like to keep everything about the weapons intact (because I like how it looks) and still be able to aim it straight with cursor.

Hi, for getting the right results when you rotate your sprites, they have to be aligned by default - meaning already when you load them in your scene - from West (180°) to East (0°) Basic game making concepts - What you need to know to start with GDevelop - GDevelop documentation.
So for your bow the original sprite should be aligned by default vertically, like:
bow_2

1 Like

You can either rotate the image or the sprite but either way it will end up looking the same with the large square pixel design basically becoming diamonds. To keep the look, you or your sister would have to create the pixel art upright.

1 Like

Hi! Thanks for asking the question. The issue for the problem could be where the point of the sprite is. By default, the origin point of the sprite is in the top-left side of the sprite. If you want your sprite to be at an exact location of the cursor, you must set the origin point of the sprite to the center. For example, if the sprite size is 50x50 pixels, the origin point must be in 25 as X and 25 as Y.

For more information, I recommend doing to the GDevelop documentations about sprite points.
GDevelop’s Documentation about Sprite Points

1 Like

Thanks. I know what you mean and it kinda sucks that I can’t just rotate the sprite in the scene the way I need it facing and to have it stay that way. What I did was rotate it in the engine the way I wanted it (like the pic you shared) so it keeps the original look then took a screenshot of it then cleaned it up in an editor then loaded it back into the scene as a sprite and it works but it does lose some quality. Oh well. thanks anyway.

1 Like

I have tried that but it doesn’t work. The sprite rotates in the center but the cursor position is not centered in front of the bow like it should be lol