Jump to content
You are about to reply to a thread that has been inactive for 1603 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted (edited)

I have been experiencing problems with passenger sits returning a system Message " No Room to Sit" I used Inara's prim sit to check i could sit a passenger in that location and there was no physics in my area that could interfere. Basically my sit is a JSON Sit with animation that provides a llSitTarget (0.05-25,0.01>,<0.0,0.0,0.0>); in state _entry . In changed this is then reset after the 1st seat is seated to llSitTarget (0.05,25,0.01>,<0.0,0.0,0.0>);  When anther passenger tries to sit this seat is not available my seats dimensions are <0.44258,0.97541,>

You should not my seating scripts sets link seating with llSetLinkedPrimativeParams Fast so standing and sitting does not change seat . However the second seat never seams to be occupied as this system error message comes in to stop my code executing to provide a new seat can display a system message "No Room To Sit".

 

 

I would there fore like to know how a seat is decided it can be sat on what criteria does LSL use to decide the seat. My physics is attached. 

 

Code:

key  Check_4_KeyNot_Linked() {
  integer j = llGetNumberOfPrims();
  list seated=[];
  j = llGetNumberOfPrims();
  for(; j--;) { if(llGetAgentSize(llGetLinkKey(j+1)) != ZERO_VECTOR) seated += [llGetLinkKey(j+1)]; }
  integer i = num_seats;
  for(;i--;) {
       avi = llJsonGetValue(SEATS_data,["seat"+(string)i,"key"]);
       if(avi!="empty" && llListFindList(seated,[(key)avi])==-1 ) return avi;
    } 
    return NULL_KEY;  
}

default
{
    state_entry()
    {.... llSitTarget (0.05,25,0.01>,<0.0,0.0,0.0>); .......

       changed(integer change)
    {
        vector avPos;
        rotation avRot;
        key agent  = llAvatarOnSitTarget();
        if(change & CHANGED_LINK)
        {
            
            if(agent==NULL_KEY) {
             
                // Stop Got Up
                agent = Check_4_KeyNot_Linked();

              // .. do something

            }
            output = getFreeSeat();
            if(output!=["full"]&&output!=["none"])
            {
                 llSetLinkPrimitiveParamsFast(llGetNumberOfPrims(),[PRIM_POS_LOCAL,(vector)llList2String(output,0),PRIM_ROT_LOCAL,llEuler2Rot(<0.0,0.0,llList2Float(output,1)>)]);
      
                // Must change sit target to next place to sit
                lLinkSitTarget(<.05,0.11,0.01>,<0.0, 0.0, 0.0, 1.0>);
            }
        }

         

 

8c8a526eb3d51299511a886c56417a83.png

6fa7feaeef977f73f4210315c3801f7c.png

5b962c69f451f5221255ceb2b18da6d8.png

Edited by VirtualKitten
Added tags
Posted (edited)

If you want multiple llLinkSitTargets, you need multiple links in the linkset.

The chair you're sitting on looks suspiciously like a single piece of mesh, unless the piano (which seems to be a separate object from the chair) is also supposed to be sat on.

Also, llLinkSitTarget should be called in state_entry and not changed afterwards, in case you're trying to set a sit-target in the Changed event.

Edited by Wulfie Reanimator
Posted (edited)

Hi Wulfie A Fox told me this could be done on single mesh please see Prim Impossible furniture which is single prim mesh: https://marketplace.secondlife.com/stores/56262

I was told by this clever fox that this llLinkSitTargets can be changed, once the first one is used is that in correct advice? 

It is clear Prim Possible can do it on single prim. I think i see what you are getting at its now linked :)

Edited by VirtualKitten
Posted
21 minutes ago, VirtualKitten said:

It is clear Prim Possible can do it on single prim.

Read a little further:

Quote

***********PLEASE READ************

This chair is 1 prim only. When you use the chair, it rezzes a shell which you sit on. The shell is 2 prims but deletes itself when you are not sitting or press the STOP button. This is absolutely necessary because most of SL requires .5-1 prim per seated avatar. (this is caused because most creators are unaware that their objects are causing this bug, which is preventable. We personally developed phPose to overcome this bug and still keep our furniture 1 prim!)

It's a little silly to call it a "bug" and the workaround (rezzing stuff on the fly) seems much worse than the problem it's trying to solve, but to each their own I suppose.

(That said, I'm not sure I've ever actually tried clearing the sit target while there's an avatar seated on it, then setting it again somewhere else on the link. I don't think it will create an available sit target, but it might be worth trying.)

  • Thanks 1
Posted (edited)

From my experiments some time ago with sitting multiple avatars on a single prim (admittedly mesh to look like several), you only see a difference changing sit-target if no avatar is seated on it. The approach I adopted in the end was to define positions for the four seated avatars as local pos and rots, then when avatar sits on the sit-target, move them to the first free defined position, and so on. Leave the sit-target alone, just manipulate the link numbers which are actual avatars. 

The devil in the detail is maintaining a list of defined sit pos and rots plus key of avatar on them.

Edited by Profaitchikenz Haiku
  • Like 1
Posted

However i changed this to code to

Code:

default
{
    state_entry()
    {.... llSitTarget (0.05,25,0.01>,<0.0,0.0,0.0>); .......

       changed(integer change)
    {
        vector avPos;
        rotation avRot;
        key agent  = llAvatarOnSitTarget();
        if(change & CHANGED_LINK)
        {
            
            if(agent==NULL_KEY) {
             
                // Stop Got Up
                agent = Check_4_KeyNot_Linked();

              // .. do something

            }
            output = getFreeSeat();
            if(output!=["full"]&&output!=["none"])
            {
                 llSetLinkPrimitiveParamsFast(llGetNumberOfPrims(),[PRIM_POS_LOCAL,(vector)llList2String(output,0),PRIM_ROT_LOCAL,llEuler2Rot(<0.0,0.0,llList2Float(output,1)>)]);
      
                // Must change sit target to next place to sit
                llSitLinkTarget(1, <.05,0.11,0.01>,<0.0, 0.0, 0.0, 1.0>);
            }
        }

  

 

Gives same message wulfie       

068663acef6b40ee02d6ea78bd64ffaf.png

Posted

I just took a look at the table and four chairs that I did which is a single prim but in fact has an LI of 2, so this supports what Qie posted, the workaround is necessary to maintain a sufficient LI to seat more than one avatar?

Posted
7 minutes ago, Qie Niangao said:

Read a little further:

It's a little silly to call it a "bug" and the workaround (rezzing stuff on the fly) seems much worse than the problem it's trying to solve, but to each their own I suppose.

(That said, I'm not sure I've ever actually tried clearing the sit target while there's an avatar seated on it, then setting it again somewhere else on the link. I don't think it will create an available sit target, but it might be worth trying.)

Hi Qie, I think using  llSitLinkTarget(1, NULL_VECTOR,NULL_ROT); sets it to zero but then you need to reset the whole prim. Its interesting that its says in that clip  that PHPose can do it or am i reading this wrong  as the crafty fox did say he had a script which would do this, but would not share it .

Posted
9 minutes ago, Profaitchikenz Haiku said:

From my experiments some time ago with sitting multiple avatars on a single prim (admittedly mesh to look like several), you only see a difference changing sit-target if no avatar is seated on it. The approach I adopted in the end was to define positions for the four seated avatars as local pos and rots, then when avatar sits on the sit-target, move them to the first free defined position, and so on. Leave the sit-targets alone, just manipulate the link numbers which are actual avatsrs.

Even without the llSitTarget or llSetLinkTarget being set in changed  leaving just one in  state_entry it gives this silly message: "No Room To Sit. Try another Spot" I was asking how it decided if a seat was valid as it seems non robust

Posted (edited)

That's the bounding box issue, I believe, you have to move each avatar so that their bounding box is not inside another prim's BB

 

Somebody replied on this very message in the building forums recently, possibly Chin Rey? Have a look in there

 

 

Edited by Profaitchikenz Haiku
Posted

Well, what I understand that Marketplace blurb to be saying is that they're simply rezzing new seating meshes, almost like invisible poseball "shells" around the seating surfaces. They won't be additional links in the linkset, though, so I'm guessing this can only work with copiable animations that get pushed into the rezzed-on-demand shells. I suppose I could go investigate in-world sometime and find out.

As far as I know, it shouldn't be possible to use even one sit target on a single-link item that is supposed to seat more than one avatar. Whenever I've tried (by moving the seated avatar somewhere else and/or setting the link's sit target somewhere else) I invariably get the same message.

  • Like 1
Posted (edited)
1 hour ago, VirtualKitten said:

Hi Wulfie A Fox told me this could be done on single mesh please see Prim Impossible furniture which is single prim mesh: https://marketplace.secondlife.com/stores/56262

I was told by this clever fox that this llLinkSitTargets can be changed, once the first one is used is that in correct advice? 

It is clear Prim Possible can do it on single prim.

1 prim chair-set from PrimPossible: (If you try to sit on this, you get "No room to sit here.")

9996c73216.png

After clicking on it: (This mesh "shell" covers the original object completely, and can be sat on.)

33395059ce.png

 

A seated avatar becomes physically very wide, which is why they tend to block each other from sitting.

However it's not completely impossible to sit directly on the same spot as another avatar, but this is what I would call a bug or at least "very quirky." Here I've rezzed mesh cube that's 0.2m on all sides. Whether or not it has a sit-target (set in state_entry and my test dummy is already sitting on it), I can sit on it just fine: video ("Fine" is a relative term.)

I believe the exact position my avatar is being put in this case is the flat-top of the already-sitting avatar's physics shape. Because avatars become a part of the object they sit on, the physical shape of the avatar is added to the object and the closest sittable surface just happens to be on top of the first avatar.

But if I place another object 1 meter above the first avatar or sit-target, I get the "no room to sit here" problem. I believe this is because the physical shape of my avatar's seated state collides with the other object I added above the intended seat. The same is caused by the table's physics shape for the PrimPossible set, and the piano next to Kitten's seat.

I should also point out that no matter what, if the object has a sit-target with no avatar sitting on it, you can always sit on that object regardless of what objects are around it. This is why I suggest that people use at least one link per seated avatar. When all sit-targets are occupied, SL will try to use the old method of finding the nearest surface to sit on, which can easily fail.

7 minutes ago, Love Zhaoying said:

How do multiple sit-targets work with Mesh, if with Prims you can only have 1 sit-target per Prim in a Linkset? 

Sit-targets work the same for prims and mesh. One link = one sit-target, whether or not it's a prim or mesh. Having separate physical surfaces in a single mesh object does not enable multiple sit-targets.

Edited by Wulfie Reanimator
  • Like 1
Posted
13 minutes ago, Wulfie Reanimator said:

1 prim chair-set from PrimPossible: (If you try to sit on this, you get "No room to sit here.")

9996c73216.png

After clicking on it: (This mesh "shell" covers the original object completely, and can be sat on.)

33395059ce.png

 

A seated avatar becomes physically very wide, which is why they tend to block each other from sitting.

However it's not completely impossible to sit directly on the same spot as another avatar, but this is what I would call a bug or at least "very quirky." Here I've rezzed mesh cube that's 0.2m on all sides. Whether or not it has a sit-target (set in state_entry and my test dummy is already sitting on it), I can sit on it just fine: video ("Fine" is a relative term.)

I believe the exact position my avatar is being put in this case is the flat-top of the already-sitting avatar's physics shape. Because avatars become a part of the object they sit on, the physical shape of the avatar is added to the object and the closest sittable surface just happens to be on top of the first avatar.

But if I place another object 1 meter above the first avatar or sit-target, I get the "no room to sit here" problem. I believe this is because the physical shape of my avatar's seated state collides with the other object I added above the intended seat. The same is caused by the table's physics shape for the PrimPossible set, and the piano next to Kitten's seat.

How do multiple sit-targets work with Mesh, if with Prims you can only have 1 sit-target per Prim in a Linkset? 

  • Haha 1
Posted (edited)

I am not sure how Wulfie achieved this with No seats declared in his prim. I removed all seating with llSitTarget(ZERO_VECTOR,ZERO_ROTATION); as i thought he said and no seat was available to me  until i replaced the seat  with llSitTarget(. I repeat a cleaver fox told me he had a script that could do this which leads me to believe its not robust. Wulfie  you said the avatar gets incredibly large are you looking at the wire frame model to obtain this information As i cannot see that happening either?

bf05bf0b38816c10a1a5d224028ab0bc.png

Edited by VirtualKitten
Add image
Posted
26 minutes ago, Wulfie Reanimator said:

Sit-targets work the same for prims and mesh. One link = one sit-target, whether or not it's a prim or mesh. Having separate physical surfaces in a single mesh object does not enable multiple sit-targets.

Ok, so each chair in your Mesh example is a separate link? That was not obvious to my ignorant reading (and my view of the mesh linkset).
 

Posted (edited)
15 minutes ago, VirtualKitten said:

I am not sure how Wulfie achieved this with No seats declared in his prim. I removed all seating with llSitTarget(ZERO_VECTOR,ZERO_ROTATION); as i thought he said and no seat was available to me  until i replaced the seat  with llSitTarget(.

Elementary, my dear Watson. But you must not have any other objects too close to the seat. Your piano is too close.

9 minutes ago, Love Zhaoying said:

Ok, so each chair in your Mesh example is a separate link? That was not obvious to my ignorant reading (and my view of the mesh linkset).

In the first picture I showed, the table and chair are all one mesh object, not a linkset. But you must touch the object before you can sit, which causes it to rez a new object, which is a linkset with enough links to seat all intended avatars. That rezzed object is more than 1 LI, so PrimPossible is "cheating" a bit.

Edited by Wulfie Reanimator
  • Thanks 1
Posted (edited)
11 minutes ago, Wulfie Reanimator said:

Elementary, my dear Watson. But you must not have any other objects too close to the seat. Your piano is too close.

In the first picture I showed, the table and chair are all one mesh object. 1 object, not a linkset. But you must touch the object before you can sit, which causes it to rez a new object, which is a linkset with enough links to seat all intended avatars. That rezzed object is more than 1 LI, so PrimPossible is "cheating" a bit.

Wulfie, I already showed my physics in piano  doesnot overlap. In addition it doesn't matter were this seat is placed. I had a bed 1 Prim, Prim possible  it seats two  so not sure about your table Wulfie. Your Single Prim box is a mystery as there no clear way to get a seat on that without a llSitTarget . I asked you how you knew the avatar was getting fatter when sat . As this was not clear in mesh view Ctrl + Shift + R that any increase was being made. How are you able to see the bounding box change for your avatar  or are you just holding something that calculates its size BB from a script? As if the latter is the case the increase could be any direction and is not observed.

 

In regard to what the fox said how could he have a script that did this if your stating it doesn't work. If this is an agreement the passenger seating is not robust what can we do about it to make it better? I was hopeful someone knew how LSL was calculating this error message and basing it on what exactly?

Edited by VirtualKitten
i forgot something
Posted (edited)
1 hour ago, VirtualKitten said:

Wulfie  you said the avatar gets incredibly large are you looking at the wire frame model to obtain this information As i cannot see that happening either?

The avatar's physical shape is not accurately shown in any of the debug views built into any viewer I know of. The exact shape can be revealed with simple raytracing using a script with llCastRay. For example, below you can see standing and ground-sitting avatars. An avatar sitting on an object is similar to ground-sitting, except the flat-top pyramid would be stretched forward like a wall.

0c9334b044.png

1 hour ago, VirtualKitten said:

I already showed my physics in piano  doesnot overlap.

It does not need to overlap with the other object, it only needs to overlap with the avatar that's about to be seated. The avatar will require much more space than the chair itself.

1 hour ago, VirtualKitten said:

In regard to what the fox said how could he have a script that did this if your stating it doesn't work. If this is an agreement the passenger seating is not robust what can we do about it to make it better? I was hopeful someone knew how LSL was calculating this error message and basing it on what exactly?

I don't know yet. I'll have to do more science to figure that out. It may very well be that he just thinks it works because of the fallback-method.

Edited by Wulfie Reanimator
Posted

hmm one question answer per post , wulfie  :), now listen to what that fox said 😛

 

Dog goes "woof"
Cat goes "meow"
Bird goes "tweet"

 

What does the fox say?
"Ring-ding-ding-ding-dingeringeding!
Gering-ding-ding-ding-dingeringeding!
Gering-ding-ding-ding-dingeringeding!"
What the fox say?
  • Confused 1
Posted (edited)
2 hours ago, Love Zhaoying said:

How do multiple sit-targets work with Mesh, if with Prims you can only have 1 sit-target per Prim in a Linkset? 

There is only  a single sit-target, you check the build at changed_link and move the new arrival to where they are supposed to be sitting. 

To be more specific, you take a single prim, give it a sit target as one does, but then do not follow the normal procedure of checking for llAvatarOnSitTarget. When changed_link you take the most recent addition and (a wise person checks it is indeed an avatar and not a second prim being joined ), and with that recent addition, set the local pos and local rot to the desired position.

 

Edited by Profaitchikenz Haiku
  • Thanks 1
You are about to reply to a thread that has been inactive for 1603 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...