With this function you can find the height of the base sprite asset, with no transforms, in pixels.
sprite_get_height(index);
Argument | Type | Description |
---|---|---|
index | Sprite Asset | The index of the sprite to find the height of. |
if (sprite_height != sprite_get_height(sprite_index))
{
image_yscale = 1;
}
The above code checks the height of the sprite as it is in the current instance and if there is a difference between that and the original base sprite, it resets the y axis scale.