Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Partial Rotation?

Dolarodus Dragovar
Registered User
Join date: 19 Mar 2009
Posts: 5
05-12-2009 03:44
Alright,
Im attemting to rotate a prim 90 deg through use of llTargetOmega.
Eventually im going to have it do it on its own(schedule it) but for now im just trying to figure out a way to make it stop after 90 deg.

The end result needs to be a smooth rotation(no jumps or sudden movement). Thats why im using target omega and not setrot
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-12-2009 04:48
target omega is really a bad choice for this. it can be done this way, but not very acurately. essentially you you time how long to stop it. if it's not physical you need to change it's actual rotation to match at the same time. if it is physical you'll probably still want to do that since it's like to be over rotated at that point.

regardless the action will be jumpy at the end... llRotLookAt or llLookAt may be a much better choice in conjunction with llStopLookAt
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dolarodus Dragovar
Registered User
Join date: 19 Mar 2009
Posts: 5
Found a Solution
05-12-2009 18:38
I ended up having to time it but i found out that when i linked one object to another, when the script reset it reset the object too like i needed.
Heres my current setup-

default
{
state_entry()
{
llSleep(20); \\lets me work around timers(SWEET)
llTargetOmega(<0,0,1>,PI,1); \\start that rotation
llSleep(.4); \\Let it spin for about 90 deg
llTargetOmega(<0,0,0>,PI,0); \\Stop!
llSleep(5); \\Stay that way so I can admire it
llResetScript(); \\Lets start over again
}
}

Later on Im going to add in extra frills but before that I need to work out this time thing.
I need to get the event to happen in corelation with clock time
So that I need to set it to start at 6:00:10 and end at 6:00:40 and begin again at 6:00:50 that I can. Got any tips?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-12-2009 21:24
sleep is only guearanteed to wait a minimum of the time specified...

as for the rest.... welcome to needing a timer (well you could just use REALLY long sleeps...same problem)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -