Rotation frustration
|
Ploy Vogel
Registered User
Join date: 27 Aug 2004
Posts: 133
|
05-09-2005 11:48
I am trying to solve a problem with an object I built that uses the rotation script. I use touch to turn the rotation on and off and everything works fine. The problem is when I take it back in my inventory (or make a copy) and then drop it again and click on it, the script tries to rotate the whole object, sort of does a quarter turn. It will work only if I save and reset the script.
I have added the llResetScript() command at state_entry to it but that hasn't solved the problem and I have also tried on_rez.
The way I linked the object is I first linked all the prims together except for the one with the rotating script, then linked the prim with the script to the object making the scripted prim as the child. Is this the correct way of doing it?
Any ideas would be appreciated, thanks.
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
05-09-2005 12:42
From: Ploy Vogel The way I linked the object is I first linked all the prims together except for the one with the rotating script, then linked the prim with the script to the object making the scripted prim as the child. Is this the correct way of doing it? If you're linking the scripted prim last, you're actually making it the Parent. The Parent prim is noted by a yellow outline in a link set, whereas all Children have a white border. That sounds like the problem to me.
_____________________
---
|
Ploy Vogel
Registered User
Join date: 27 Aug 2004
Posts: 133
|
05-09-2005 13:36
Hi.
I don't link the scripted prim last, I make it the child prim but I still have the problem. I am at work now but this evening I will post the script I am using.
|
Michael Psaltery
Registered User
Join date: 6 Jun 2004
Posts: 57
|
05-09-2005 13:45
I've seen the same problem: rotation applied to child prims using llTargetOmega() results in other children in the linked set rotation (or the entire linked set). Haven't yet submitted a bug report, but it's very frustrating.
You're on the right track making it a child object though... rotating the parent will do the entire set every time (which itself is a pain, if you really NEED to rotate just the parent).
|
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
|
grief
05-09-2005 14:47
This was giving me grief again just yesterday.. If you can have your scripts reset on_rez..
|
Damian Zander
Wicked, Inc.
Join date: 21 May 2004
Posts: 19
|
05-09-2005 15:40
Yeah I'm having this same issue, things I'm making for my partner that have one rotating piece (and not the parent) work when I first make it but when I put it in my inventory and put it back out, it rotates the WHOLE object. Could also be why my tea cup experiment ride was doing that now that I think of it.
Has anyone filed a bug report on it? It's very reproducible.
|
Ploy Vogel
Registered User
Join date: 27 Aug 2004
Posts: 133
|
05-09-2005 19:01
Here's the script I am using. I'm not sure if there is anything else that can be done or if it is a bug and we have to wait for a fix.
integer running=TRUE;
default { on_rez(integer start_param) { llResetScript();}
state_entry() { { running=TRUE; llTargetOmega(<0,0,1> * llGetLocalRot(),-PI,1.0); } } touch_start(integer num_detected) { if (running==TRUE) { running=FALSE; llTargetOmega(<0,0,0> * llGetLocalRot(),-PI,1.0); llStopSound(); } else { running=TRUE; llTargetOmega(<0,0,1> * llGetLocalRot(),-PI,1.0); llPlaySound("song" , 1.0); llLoopSound("song", 1.0);
} } }
|
Caoimhe Armitage
Script Witch
Join date: 7 Sep 2004
Posts: 117
|
05-10-2005 08:36
I just don't even use llTargetOmega except for the crudest animation anymore. I find hand-animating using llSetLocalRot() to be much more effective, especially in complex linked objects.
- C
|
Damian Zander
Wicked, Inc.
Join date: 21 May 2004
Posts: 19
|
05-10-2005 14:25
I filed a bug report on it.
This'll delay some of the projects I've been working on, but maybe it'll get fixed.
I'd use the llSetLocalRot() for some of this I suppose, but for some things, seems a bit overkill and would make the object active, unless I misunderstand all this mess. llTargetOmega is pretty much a set and forget, client side effect, and llSetLocalRot involves using a timer to make something spin, am I right? Which means our old sim has to update it a bunch. I don't want our poor sim stressing any more than it has to. It's not important if the objects I want to rotate are physically rotating.
Anyways, it's still a bug. The whole object rotates instead of just the child prim only after you pick it up and put it back out. That's way screwy.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-10-2005 14:46
llTargetOmega, if I recall properly can't be applied to child prims, or on attachments.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
05-10-2005 16:33
From: Strife Onizuka llTargetOmega, if I recall properly can't be applied to child prims, or on attachments. Attachments is correct. Child prims can have llTargetOmega... but the effect is *cough* buggy. 
_____________________
---
|
Damian Zander
Wicked, Inc.
Join date: 21 May 2004
Posts: 19
|
05-10-2005 19:00
From: Jeffrey Gomez Attachments is correct. Child prims can have llTargetOmega... but the effect is *cough* buggy.  Yeah, we discussed this before when I was making the teacup (which still isn't working). Anyways, like I said, I bug reported, what good it will do only time will tell. I'm not using it as an attachment, just a standalone thing where only a piece needs to be rotated. llSetLocalRot just seems hacky when all I want to do is rotate it for effect, not physically on the server. Oh well, I'll bog this old sim down with more useless crap.
|