Quote:
Originally Posted by cbkbud
Is it possible to change the anchor position of a GANI or image?
|
That's a great idea.
Maybe something like:
NPC Code:
centerrelative - Where the relative center of the image is based on the width and height. Default is {0.5, 0.5}.
centeroffset - Pixel offset from the relative center that is regardless of image width and height. Default is {0, 0}.
So if you wanted it to always rotate around its lower left corner you could just do:
PHP Code:
centerrelative = {0, 1};
centeroffset = {0, 0};
If you wanted to rotate 16 pixels down and right from the upper left, you could just do:
PHP Code:
centerrelative = {0, 0};
centeroffset = {16, 16};