W
Wintermute()
Guest
I have an issue where having the center of my sprite as the origin is necessary for correct movement, but it doesn't look good when I am creating ballistic missiles at the sprite's x/y point, as they come out of the middle of the sprite, and not the 'barrel of the gun' if you get my drift...
Been looking how to do this in the gms help, is sprite_set_offset the right command to use ? my question - I'm using this code but it isn't working, can anyone let me know where I've gone wrong ? this assumes I've created a new sprite (spr_faker) with the origin point at the barrel of the gun as a clone of the original (spr_orig) :
sprite_assign(spr_faker, spr_orig);
sprite_set_offset(spr_faker, sprite_get_xoffset(spr_orig), sprite_get_yoffset(spr_orig));
?
thank you!
Been looking how to do this in the gms help, is sprite_set_offset the right command to use ? my question - I'm using this code but it isn't working, can anyone let me know where I've gone wrong ? this assumes I've created a new sprite (spr_faker) with the origin point at the barrel of the gun as a clone of the original (spr_orig) :
sprite_assign(spr_faker, spr_orig);
sprite_set_offset(spr_faker, sprite_get_xoffset(spr_orig), sprite_get_yoffset(spr_orig));
?
thank you!