Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotating an object with touching

MeLight Korvin
Im on da Use
Join date: 4 Jun 2005
Posts: 99
06-07-2005 02:31
I want to rotate an object by 10 degrees every time it is touched, i tried to use this code:

____________________________
rotation rotat;
default
{
touch(integer num)
{
rotat = llGetRot();
rotat.z += 10;
llSetRot(rotat);
llSay(0, "Touched";);
}
}
____________________________

Every time i click the object it says "Touched" but isnt rotating. Plz help
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
06-07-2005 02:51
CODE
touch_start(integer total_number)
{
llSetRot(llEuler2Rot(<0,0,10> * DEG_TO_RAD) * llGetRot());
}
_____________________
---
MeLight Korvin
Im on da Use
Join date: 4 Jun 2005
Posts: 99
06-07-2005 07:52
thanx a bunch dude