Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Oh Sit!

Hplar Sapwood
Registered User
Join date: 11 Nov 2006
Posts: 3
12-29-2006 12:11
Hi,

I'm having a few SitTarget woes.

Basically I'm trying to create a medical scanner (similar to an MRI machine) with a bed that slides through a cylinder (with the person sitting on it going through as well).

The only way I found to make the person sitting on the bed pass through the scanner whilst sitting on the bed was to make the bed the root prim and move the the rest of the object round the bed.

This method works fine as a standalone object however I was planning on placing the the scanner onto a medical ship. This would mean that the bed could not be the root prim because the flight script requires the seat to be.

Is there any way to change an avatars sit position whilst they are sitting on an object other than by moving the root prim.

I tried using sit target put the position doesn't actually change until the Av stands up and sits down again.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-29-2006 12:37
No, but you can use the same llSetPos movement functions to move a child prim. The coordinates change, now you need to specify position vectors relative to the root prim, instead of the sim coordinates. rotation tends to get a little tricky. Search the forum and wiki for child prim movement stuff, this has been covered.
Martin McConnell
Registered User
Join date: 8 Sep 2006
Posts: 116
12-29-2006 13:00
Uhmm, how about using a poseball that you link to your bed? That is very simple to do. If you want your patient to move around a little that will be an animation instead of a pose, but a poseball will handle animations as well.

Another way is to put code into the bed itself. Search for one of the free "floats" and tear the script out of it. (those floats that people lay on and float on the water) If I have the name wrong and you cannot find it just IM me and I'll send you one.
_____________________
Martin McConnell
Still an SL Virgin
Quote: "I'm saving myself"
Hplar Sapwood
Registered User
Join date: 11 Nov 2006
Posts: 3
12-29-2006 15:28
Hi Ziggy, I did try what you suggested. The bed moves fine but the person sitting on it doesn't. The person sitting only moves if the root prim moves. Which is why I had to set the bed as the root prim

I'm not sure if using an animation would work as the animation itself doesn't control the players position in the world.

I don't think a poseball would work either for the same reason that Ziggys suggestion didn't.

I'll give it a go though.
Peekay Semyorka
Registered User
Join date: 18 Nov 2006
Posts: 337
12-29-2006 15:56
Animations can in fact control the avatar's position, and it's trivial to animate an avatar to lay down and move horizontally.

So it's possible to move the child prim bed using llSetPos, while at the same time move the avatar by animation. Timing them so both move in sync would be tough, however.

If the timing proves impossible maybe you can make the bed static, or use texture anim to simulate movement of the bed (more like a conveyor belt.) You could also upload a sound to make the process seem more realistic.

-peekay
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-29-2006 16:33
Was the sit target in a different prim than the one that was being moved? Or maybe this does not work, i.e. even if the sit target is in a child prim, moving the child prim won't move the av? Interesting, I did not know that. I don't think I've ever tried this, now that I think about it.
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
12-29-2006 17:02
From: Ziggy Puff
Was the sit target in a different prim than the one that was being moved? Or maybe this does not work, i.e. even if the sit target is in a child prim, moving the child prim won't move the av? Interesting, I did not know that. I don't think I've ever tried this, now that I think about it.

That's correct Ziggy, it doesn't work. Think of an avatar sitting on a prim in a linked set as just another humanoid-shaped prim; move an individual piece, even the piece the avatar is sitting on, and the avatar stays in place just like all the other prims do.

Folks who use couples' poseballs tend to be very familiar with this issue, since the avatars don't follow the individual linked balls around while they are being adjusted relative to each other. You either need to eyeball it with trial-and-error, or unlink the balls so you can do your adjustments with a pair of discrete "one avatar sitting on one prim" affairs, in which case the avatars move with the prims. Then link them back up when you're done.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-29-2006 17:20
Learn something new every day :) But it makes sense, once you mentioned the "a sitting av is like another linked prim" thing.