|
Astarte Artaud
Registered User
Join date: 10 Feb 2007
Posts: 116
|
06-16-2009 10:20
Hi all, hope someone can help I have a linked set of prims all of which rotates round the root prim (sphere) axis (the root prim also rotates, at the same speed and direction as the child prims). Although I can get it to successfully stop, I need it (the root prim) to reposition itself in a vertical position. So far I have been unable to accomplish this. Is there any way this can be done.
|
|
Ryder Spearmann
Early Adopter
Join date: 1 May 2006
Posts: 216
|
06-16-2009 18:55
Reorienting the root prim will cause all of the child prims to reorient and reposition. If you want the child prims to stay where they are... then there is little you can do other than to individually have all of the children remember where they are... reorient the root prim(and the children) to vertical, and then have the child prims return and reorient to their previous location individually.
-rs-
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-16-2009 22:43
depending on what you are using to rotate the set you can force the whole set to snap back to it's initial orientation using llSetRot( ZERO_ROTATION ),
if you only want the root to snap to it's initial orientation you can cheat by making the root smaller, and hidden inside a child prim with the same center location, then only snap that child back to initial orientation (I THINK the formula is llSetLocalRot( llGetRootRotation() / ZERO_ROTATION ), but you may need another "llGetRootRotation /" in front of the first. if you use llSetRot, or llSetLinkPrimitiveParams be aware of SVC-93)
if you don't want the root to rotate at all, you can use the same child prim over the root trick and apply a contrary rotation to that child.
_____________________
| | . "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... | - 
|
|
Astarte Artaud
Registered User
Join date: 10 Feb 2007
Posts: 116
|
More info !!
06-17-2009 04:13
The exact problem encountered. If you imagine a letter V (of child prims) with a root prim sphere at its base, the whole thing can randomly rotate using llTargetOmega up to 90 degrees in any direction around its base axis. When it stops it is required to reposition itself to look like the letter V again. I seem to have finally solved it by duplicating the stop instruction. the first time the motion stops. the second time it will actually reposition to vertical. But as final part of stop instruction is llSetRot(ZERO_ROTATION). I would have thought it shouldn't have had to repeat the stop sequence to reposition correctly.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-17-2009 23:20
assuming it's non physical, setting both the spinrate and gain to zero should stop it in it's original position, assuming it's physical it just stops it wherever and you need the extra llSetRot call to actually snap it back to it's origin position. (that is, it's expected behavior)
_____________________
| | . "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... | - 
|
|
Cyd Woolley
Carpe Cerevisiam
Join date: 6 Jan 2007
Posts: 21
|
06-18-2009 10:08
What Astarte is experiencing may be related to this bug I filed in the JIRA. Have a look: http://jira.secondlife.com/browse/SVC-4348
|