View Full Version : Rotating Polygons

03-11-2008, 02:21 AM
function onCreated() {
this.start = {0, 0};
with( findimg(200) ) {
polygon = {this.start[0], this.start[1], this.start[0] + screenwidth, this.start[1], this.start[0] + screenwidth, this.start[1] + screenheight, this.start[0], this.start[1] + screenheight};
image = "fog.png";
layer = 4;
mode = 1;

Why aren't you able to rotate polygons? If I add "rotation=" in there it'll disappear. Any ideas?

03-11-2008, 02:25 AM
TShowImg.eulerrotation = {rotx, roty, rotz};

Never used it but try that.

03-11-2008, 02:29 AM
Euler rotation doesn't work(I've tried and tried it).
It doesn't work because it calculate off of the center of the polygon... thus it's not disappearing, but rotating out of view.
In order to rotate it, you have to script the rotations into the polygon coordinates themselves.