Problem with a resizing prims.
|
|
Jo Sapeur
Registered User
Join date: 27 Sep 2005
Posts: 46
|
11-16-2007 15:39
I have made a house with several prims that are scripted to change their size and position in the linkset to regroup themselves into a balcony. Now, if my avatars stands on the object these prims are linked to (like the floor in front of the balcony) while they move around, the whole object moves as if trying stay at it's geometric center. I have used llSetPrimimitiveParams(), llSetScale(), llSetPos() and llSetLocalPos(), trying to fix the problem... but nothing helped. Any ideas? I would prefer a solution over 'tricks' that circumvent the problem, like changing the linkset or using invisible/phantomized prims instead (if possible).
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-16-2007 16:02
Do you have anything set as physical? Nothing non physical should ever move without a script telling it to do so or an avatar editting it.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jo Sapeur
Registered User
Join date: 27 Sep 2005
Posts: 46
|
11-16-2007 16:17
No, it's a single linkset and nonphysical.
And the whole segment only moves if I stand on a part of it... and only when the prims are increasing in size. When they are getting smaller, the object stays in place. It's as if the resizing prims push against an invisible wall.
Pantomime-prims... definitely one of the weirdest bugs I have ever seen in SL.
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
11-16-2007 16:28
I would have to see it in person, but it sounds like *maybe* you are moving the root prim of the balcony as well? Though, it shouldn't matter if you are standing on it or not; it should have the same behavior either way. Otherwise, sounds like you found a (new) bug! Congratulations! 
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
11-16-2007 17:42
From: Jo Sapeur ...Now, if my avatars stands on the object these prims are linked to... Do the prims really end up in different places, depending on whether the avatar is there, or is it just that you *see* them move when the avatar is there, but they end up in the same place as they would if the avatar weren't present? You can sometimes see the linkset move around strangely in the Editor, too, when you "Edit linked parts" (but maybe only when moving the root prim?), so maybe this is related--but only if it's a matter of appearance, not actual end-result positions being different. (I don't really know what the Editor is doing when this happens, either. It feels like it's moving the rest of the linkset to its new position relative to the moved prim, and then moving the whole linkset back where it belongs. But this may all be irrelevant anyway.)
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
11-16-2007 19:07
I think this is most often seen when you link objects that were not previously linked. They often seem to "reseat" themselves in place as a result of SL transforming their reference coordinates from being relative to the world to being relative to the root prim. Does your script do any linking or unlinking of the objects? I've never seen it happen with edits on linked prims but it's certainly possible I suppose..
|
|
Jo Sapeur
Registered User
Join date: 27 Sep 2005
Posts: 46
|
11-17-2007 00:40
Okay, here is the code. If I simply link two prims, put it into the child and touch that prim while standing on the root prim, the whole object moves. From: someone integer doorID; default { state_entry() { doorID= (integer) llGetObjectDesc(); } link_message(integer sender_num, integer num, string str, key id) { if(num == doorID && str == "open"  { state open; } } touch_start(integer num_detected) { llMessageLinked(LINK_SET, doorID, "open", llDetectedKey(0)); } } state open { state_entry() { llSetPrimitiveParams([ PRIM_SIZE, <2.0, 10.0, 7.7>, PRIM_POSITION, llGetLocalPos() + 4 * llRot2Fwd(llGetRot()) ]); } link_message(integer sender_num, integer num, string str, key id) { if(num == doorID && str == "close"  { state closed; } } touch_start(integer num_detected) { llMessageLinked(LINK_SET, doorID, "close", llDetectedKey(0)); } } state closed { state_entry() { llSetPrimitiveParams([ PRIM_SIZE, <10.0, 3.9, 7.7>, PRIM_POSITION, llGetLocalPos() - 4 * llRot2Fwd(llGetRot()) ]); } link_message(integer sender_num, integer num, string str, key id) { if(num == doorID && str == "open"  { state open; } } touch_start(integer num_detected) { llMessageLinked(LINK_SET, doorID, "open", llDetectedKey(0)); } }
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
11-17-2007 02:39
I'm not seeing what you're seeing when I try this. I dunno if it's not happening or if I'm just not "looking right" but I tried pretty hard to see it. One observation: if this script were in any prim in the linkset, that prim would move whenever touching any other prim in the linkset with the script and the same contents of its Description field. (That may have been the intent, or maybe there are other scripts for other prims, but if for example the root prim contained this script and both had blank Descriptions, I think it would try to move, too, when the child prim was touched.)
|
|
Jo Sapeur
Registered User
Join date: 27 Sep 2005
Posts: 46
|
11-17-2007 22:28
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-18-2007 00:38
well I was going to try a quick test to see what's up, but SL has seriously borked me tonight.... saving scripts hangs unless it's set to not running, touches failing in child prims, and other idiot weirdness.... regardless of sim or relog
from the description and pics it does sound like the sim is recalculating object center to line up, but that edit is calculating based on the root...
not sure but maybe the sim recalculation is being triggered by collision with the object root...why... dunno...
does it still happen if the object is locked? how about making the root something that can't be stood on (wall, window, other hidden prim) ?
certainly looks like a bug =/
_____________________
| | . "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... | - 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-18-2007 10:22
AH I see the light!!! The pics helped enormously! I have a space pod kind of similiar to yours. The door rotates up and when I click it and it raises, the whole build jumps sometimes. Since it didn't really harm anything I never troubleshot it to see the cause.
But now that Void mentioned it then that is close to the cause and problem. But it isn't the object center causing the problem but the bounding box itself. I bet like mine, everything is linked together. Try putting in an unlink before you execute the rest of the code and then relink it when you finish.
Or alternatively you can just wait. When Havoc 4 is introduced to the main grid then this problem should go away. If you have had the build since the last snapshot was taken in Beta then go there, rez your build and try it. Bet it won't "jump" any more. If anyone wants the long, boring, technical explanation as to why the difference, then I would have to write it up later. I need to run and do some stuff in RL.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jo Sapeur
Registered User
Join date: 27 Sep 2005
Posts: 46
|
11-19-2007 23:00
From: someone Or alternatively you can just wait. When Havoc 4 is introduced to the main grid then this problem should go away. If you have had the build since the last snapshot was taken in Beta then go there, rez your build and try it. Bet it won't "jump" any more. I just tried it. ... Thank God! 
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
11-19-2007 23:46
I assume you have a script in each of the linked prims to do the position/size changes.
I would suggest reducing the whole thing to a *single* script and make clever use of the llSetLinkPrimitiveParams() command.
|
|
Jana Kamachi
Registered User
Join date: 19 Apr 2007
Posts: 111
|
11-19-2007 23:49
"I would suggest reducing the whole thing to a *single* script and make clever use of the llSetLinkPrimitiveParams() command."
When the object is rezzed, have each (Uniquely named object) link message the master script, with its name. master stores a list of link numbers vs. names, and then just do operations with that. Will let you add other stuff later.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
11-20-2007 04:27
instead of having the prims linkmessage the master (which needs yet another script for each prim) the master itself could just loop through the linkset to determine numbers and names as needed.
More efficient that way and can be updated on link changes.
|