Jump to content

Seats Rezzed Vs Wearable


You are about to reply to a thread that has been inactive for 3276 days.

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

Recommended Posts

Trying to create two seats. One a bar stool, the other a higher lifeguard chair.

I want to use a relaxed looking seating animation.

I tried using a drinking script to load the animation which works fine in the bar stool, but I can not get it to sit higher in the taller chair.

Rezzing both I can get them to work ok using positioning sets but this is really to use as wearable. The avatar position on wearable worn on pelvis I can only adjust the chair not the avatar height/position.

 

I think I need a script that loads the animation and can set the Z position of the avatar. But no idea how to make and can't find.

Link to post
Share on other sites

The lsl call you want is llSitTarget() .  Adjust the z value to the distance in metres you want between the centre of the prim containing the script and where you want the avatar's hips.   I'm assuming you can edit your existing script.

There's plenty of excellent tools to help you adjust this.   I can recommend a free one by a forum regular, Dora Gustafson.

 

Link to post
Share on other sites

As Innula describes, the usual way of positioning animations in a chair is with a sit target, but you say:

Rezzing both I can get them to work ok using positioning sets but this is really to use as wearable.

Evidently, then, you don't intend people to sit in the chairs, but rather to wear them, and in that case llSitTarget isn't going to help you.  (I've never heard of "positioning sets", but it might be the llSitTarget-adjusting tools that Innula describes, I'm not sure.)

If that's correct, you're on the right path with focusing on the Z-offset of the animation.  The easy solution is to use a sit animation that, used by itself, already fits the chair when worn. Well, that's "easy" if you happen to have such an animation, or if you're making the animations yourself. If not, you can overlay another, high priority animation that does nothing but adjust the Z-offset of the avatar, and play it along with the sitting anim. (This also makes it possible to use a different offset anim to fit different avatar shapes -- but of course it's more complicated.)

Anyway, one script that already does this is OpenCollar. It may be that you can re-purpose the height-adjusting animations inside the collar for your needs.

Link to post
Share on other sites

Thank you guys.

 

Nobody will be sitting on it rezzed, it will be wearable ONLY.

I am wondering if animations are per set to height when made.

difference in height between say a camp stool and a bar stool for instance requires the av to be about twice as high off the ground.

Link to post
Share on other sites

Sorry, I didn't properly understand the first time.

Yes, animations have a built-in vertical offset, which is set by the animator and can't directly be altered in-world.

If the animation is played when you're sitting on something, then it's easy to compensate for the built-in offsets by adjusting the sit target, with llSitTarget.   But if it's being played from something you are wearing, then it's far more difficult -- basically, as Qie suggests, you need to use OpenCollar's method, which is essentially to play a second animation, on top of the first one, that does nothing but alter your z offset from the ground.

Third-party viewers, at least those that have RLV, allow you to adjust your offset from within the viewer, too.   But that has to be done by the person using the TPV.

 

 

Link to post
Share on other sites

I played with this a little bit today, prompted by another thread on a different forum, and I now think the approach of overlaying a Z-offset animation on top of a pre-made sit anim is unlikely to work very well.

First, there's the problem of animation priorities.  The OpenCollar Z-offset anims are all priority 3, but the vast majority of sit anims are priority 4.*  That could be overcome by making your own Z-offset anims (they're easy to make with a text editor -- no anim program required) and uploading them at priority 4, so this priority problem by itself is not fatal to this approach.

But there's another, more critical problem: Retaining the avatar "tilt" when the Z-offset anim is played. I noticed that those OpenCollar anims seem to make the avatar pitch forward when played on top of most (but not all) sit anims. What I think is going on is that those sit anims tilt the avatar core toward the back (rotated on the avatar's Y axis), then compensate by rotating the body parts forward relative to the core.  Then, when the Z-offset anims are played on top, they force the rotation back to vertical, revealing the sit anim's bent-forward pose.

This is all just a guess -- and I haven't the faintest idea why sit-animators would do this with their poses, so maybe it's all something else entirely. If it's correct, then theoretically one could have a whole range of Z-offset anims that work for different core rotations, but that would be a massive undertaking. (And I even found one anim that appeared to be rotated on the avatar's X-axis, too.)

Even more speculative: I'm guessing that TPVs can change the avatar's Z-offset without zeroing-out the avatar rotation; AFAIK, an animation has to do both at the same time.

____

*One might wonder why so many sit anims are priority 4. My hunch is that it's to get them to play over the default sit animation, which is priority 4. And the default sit animation is looped, so it's non-trivial to get it to stop playing, using llStopAnimation(). That requires playing a one-frame non-looped animation immediately after the llStopAnimation("sit") call. It appears to me that most sit-related and AO scripts don't do that, and thus the custom sit animations are made with priority 4 in order to be seen when played on top of default "sit".)

 

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 3276 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...