PDA

View Full Version : Change the rotation of polygons and text


Tolnaftate2004
10-24-2007, 02:00 AM
I tested the rotation of the various types of images like so:
//#CLIENTSIDE
function onCreated() {
this.img = IMAGE;
this.img.layer = 7;
onTimeout();
}
function onTimeout() {
this.img.rotation = (this.img.rotation + pi/90) MOD (2*pi);
timeout = 0.05;
}
Note: MOD is modulo, but I get a bad request when it's in the post...

One can define an image and apply a rotation, and the image will rotate about its center. Cool. One can define a polygon and apply a rotation, and the polygon will fly about the screen in a circle with radius dependent upon the polygons size (I'm guessing). One can define a string of text to be displayed on the screen, and a rotation to be applied, and the letters will rotate individually getting narrow or wide and then flipping upside-down or disappearing all together.

Considering all of these things share a datatype, can we make it so that they all act that same when a rotation is applied? If they all rotated the same way an image does, that would be the most useful, I think.

Admins
10-24-2007, 05:58 PM
You can also use the "spin" variable. The text rotation is not working fine on Windows yet, can check the polygon thing though.

Tolnaftate2004
10-24-2007, 08:49 PM
I only want to rotate the text a certain degree, the script above was just a test.

And I'm using Linux, so the Windows issue does not apply here....

Inverness
10-24-2007, 11:30 PM
So try the "spin" variable anyways.

DustyPorViva
10-25-2007, 01:21 AM
If he wants it to stay at one degree of rotation, spin isn't going to help.