Quote:
Originally Posted by Twinny
Having issues rotating a showimg
PHP Code:
function onCreated() {
with (findimg(201)) {
polygon = { 30, 20, 320, 20, 320, 80, 30, 80};
image = "zone_beamh1.png";
layer = 4;
//this.rotation = degtorad(180);
}
}
This works fine but as soon as I uncomment the rotation, it dissapears
|
This has to do with the anchoring position of polygons, which is the upper-left instead of center. Thus when you attempt to rotate it doesn't disappear, it rotates out of the screen space. Try rotating very small radians and you'll know what I mean.
Sorry, gonna have to script up your own rotations for polygons, not that hard though
