Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRotateTexture

Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
05-04-2008 08:31
llRotateTexture(float angle, integer side)

Not sure how to use this function, the float angle part. The wiki doesn't help and search comes up blank.
Quote from the wiki "Sets the rotation of the texture on side to angle, in radians."
I'm lost...

I'm no math wiz, hell, I have trouble helping my daughter with her 7th grade math.
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
05-04-2008 10:29
This is the same as the "Rotation (degrees)" field in the build menu's Texture tab but it's in radians instead of degrees.

To get from degrees (0 to 360 = full circle) to radians (0 to PI * 2 = full circle) you can multiply the degrees you want by DEG_TO_RAD. For example, "llRotateTexture (90.0 * DEG_TO_RAD, ALL_SIDES);" will rotate the textures on all sides of the prim by 90 degrees.

Does that help?