GameMaker draw_sprite_general rotation

I'm using draw_sprite_general. It works fine when its not rotated, but as soon as you rotate it the left, top, width, height is also rotated.

The links below show a screenshot of both rotated and non rotated versions. This should make it much clearer.

(Not Rotated) https://drive.google.com/open?id=16xmwlNdTqkMdGTLlPqc711ArAf2Zv1v-
(Rotated) https://drive.google.com/open?id=1C8Ek8ffbeoKWye9iskH0ExN9KDPYmVwB

Please does anyone have a work around or a solution for this.

Any insight would be most appreciated.
 
C

CreatorAtNight

Guest
I don't understand what you mean with the left, top, width height is also rotated?

For me it seems like the sprite is just rotated 45 degrees CCW.
 
The top left etc just tells it where to start drawing. This is part of the draw sprite part function.

When the sprite is rotated I want it to crop from the left not from an angle.
 

kupo15

Member
code and what element is looking wrong? Hard to see when the screenshots shift. A little pointer to which rotation you want addressed for the moment and what it should look like would help. If you want to keep things where they are, you have to add in an x/y translation as well
 
C

CreatorAtNight

Guest
The draw_sprite_ext is first cropping your sprite and then it rotates it. If you want to roate first and then crop it you need a different approach. I'm not sure if there would be a way to do this in code, maybe first draw the sprite with a set rotation and then mask it? I'm not really sure how to do it, maybe this helps: https://forum.yoyogames.com/index.php?threads/masking-sprites-to-other-sprites.10135/

But yeah, the problem you have right now is the order in which draw_sprite_general is doing the cropping and rotating.
 
I'm glad you understand exactly where I'm coming from. I am currently thinking of different was to fudge it now unfortunately. Thank you for your input. At least I know I'm not going mad.
 
Top