Rotation Script

Creating scripts
Post Reply
User avatar
Geoff Quinnell
Posts: 43
Joined: Sun Jul 28, 2013 10:35 am
Has thanked: 17 times
Been thanked: 71 times

Rotation Script

Post by Geoff Quinnell »

Hi all... I have a basic slow rotation script...

default
{
state_entry()
{
llTargetOmega(<0,0,1>,0.1,1.0);
}
}

But I would like to amend it to stop at a set time period (like a pause in the rotation) at each quarter... 0 /90 / 180 / 270 degrees

Would anyone know how this can be achieved?
Thank you for any help offered :)
Geoff
These users thanked the author Geoff Quinnell for the post:
Ilan Tochner
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

Re: Rotation Script

Post by Graham Mills »

Don't script much these days but something like this might work -- change the float values to suit (the first one is the time taken for rotation, the second is the delay between rotations). NB modified from continuous script example at http://wiki.secondlife.com/wiki/LlSetKeyframedMotion.

Code: Select all

default
{
    touch_start(integer total_number)
    {
        llSetKeyframedMotion([llEuler2Rot(<0.0,0.0,90.0>), 5.0, ZERO_ROTATION, 2.0],[KFM_DATA,KFM_ROTATION, KFM_MODE,KFM_LOOP]);
    }
}
These users thanked the author Graham Mills for the post (total 3):
Ilan TochnerGeoff QuinnellShandon Loring
User avatar
Geoff Quinnell
Posts: 43
Joined: Sun Jul 28, 2013 10:35 am
Has thanked: 17 times
Been thanked: 71 times

Re: Rotation Script

Post by Geoff Quinnell »

Thank you Graham... I'll give that a go when I am next in :)
Cheers
Geoff
These users thanked the author Geoff Quinnell for the post:
Graham Mills
User avatar
Shandon Loring
Posts: 1341
Joined: Sat Oct 26, 2013 3:25 am
Has thanked: 961 times
Been thanked: 1581 times
Contact:

Re: Rotation Script

Post by Shandon Loring »

Very Elegant Graham!
Nicely done!!
These users thanked the author Shandon Loring for the post:
Graham Mills
Post Reply