Page 1 of 1

Rotation Script

Posted: Sun Sep 08, 2019 11:35 pm
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

Re: Rotation Script

Posted: Mon Sep 09, 2019 10:32 am
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]);
    }
}

Re: Rotation Script

Posted: Mon Sep 09, 2019 5:31 pm
by Geoff Quinnell
Thank you Graham... I'll give that a go when I am next in :)
Cheers
Geoff

Re: Rotation Script

Posted: Mon Sep 09, 2019 8:09 pm
by Shandon Loring
Very Elegant Graham!
Nicely done!!