|
Smithy Zeno
ownes 9 pet cacti
Join date: 3 Aug 2006
Posts: 52
|
05-20-2008 03:16
Hey everyone, I was experimenting with llRotateTexture today and I can't seem to get it right. I have this code in the state_entry: llRotateTexture(90,0);
But when it rotates, it doesn't rotate and it actually rotates to 116.62. So if anyone can help me, that'd be great.
_____________________
-Smithy
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
05-20-2008 03:55
From: Smithy Zeno Hey everyone, I was experimenting with llRotateTexture today and I can't seem to get it right. I have this code in the state_entry: llRotateTexture(90,0);
But when it rotates, it doesn't rotate and it actually rotates to 116.62. So if anyone can help me, that'd be great. Sets the rotation of the texture on side to angle, in radians. llRotateTexture(PI * .5,0);
If you hate radians (and I do) try writing it like this: llRotateTexture(90 * DEG_TO_RAD,0);
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
|
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
|
05-20-2008 07:22
rotation in radians, sl has some constants to save memory and time, because multiplication and vector calculation takes time without parallel processing:
DEG_TO_RAD = PI/180 = 0.01745329238 RAD_TO_DEG = 180/pi = 57.29578 (use this one to avoid division by zero)
TWO_PI == 360° in radians PI == 180° in radians PI_BY_TWO == 90° in radians
|
|
Smithy Zeno
ownes 9 pet cacti
Join date: 3 Aug 2006
Posts: 52
|
05-20-2008 12:42
Thanks!
_____________________
-Smithy
|