Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotate 45 degrees one at a time.

Luke Poplin
Registered User
Join date: 2 Feb 2007
Posts: 32
06-17-2008 12:55
I can't get in-world to test this, so here's my question:

The intention is to rotate a prim from 0 to 45 degrees, but rotating only 1 degree at a time.

The function:

CODE

do_rot()
{
float deg = 1.0;
vector eul = <0, 0, deg>;
eul *= DEG_TO_RAD;
rotation quat = llEuler2Rot(eul);
llSetRot(quat);
}


I have referenced llSetRot (http://lslwiki.net/lslwiki/wakka.php?wakka=llSetRot&show_comments=1#comments) and my understanding is that my function will rotate the prim TO 1 degree. I'm thinking I have to introduce a loop that increments the "deg" variable by one each time until I reach 45.

Is my thinking correct?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-17-2008 13:06
From: Luke Poplin
Is my thinking correct?

Yes.
Luke Poplin
Registered User
Join date: 2 Feb 2007
Posts: 32
06-17-2008 13:45
Thank you!