Jump to content

Can I specify direction avatar faces when they are unseated?


GloriaGlitter
 Share

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

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

Recommended Posts

I have a script in an object such that when an avatar sits on this object, I can issue a command on a channel that the script listens to which will then move the object with the seated avatar.  When the object arrives at the destination the avatar is unseated using llUnSit.  I have noticed that whatever direction the object is facing when it arrives, when the avatar is unseated it always faces forwards along x-axis.  Ideally I would like the avatar to stand facing forwards of the objects direction.  Is this possible or is this a feature of llUnSit that unseated avatars always face the same direction irrespective of the object position?

I did notice a quirk which fooled me when I was testing my scripts.  If the avatar that is seated is me, then I do face the same direction of the object when I get unseated.  It was only when other avatars started to use this and it was me issuing the command to move the object, that I noticed that they all were unseated facing along x-axis.

Thanks

Link to comment
Share on other sites

It's a good deal more random than that.  If there's anything for the avatar to bump into as it is unsitting, that can affect its position and rotation too.  There's unfortunately no reliable way to predict which way the av will always end up facing, and you cannot rotate an unseated avatar directly.  If you have access to an experience, you can use the rather clumsy approach of teleporting the av and use the final (look_at) vector parameter in llTeleportAgent to control the facing direction. That is not just clumsy, however, but it looks unnatural and creates the "Whoosh!" teleport sound too. 

Link to comment
Share on other sites

You can't do much at unsit without cooperation from a script in the avatar. After unsit, the seat has lost all control over the avatar. So the sit script can't do much of anything. This is why "Stand" puts avatars standing on chairs and tables. Sitting is so much more graceful. There are some cars where, when you request "Sit", the door opens, the avatar bends, enters the car, and sits. Then the door closes. But unsit leaves the avatar on top of the car.

You can do things with RLV or experiences to  control unsits, but that's overkill.

How could unsit control work well? You'd need some way to give the seat one last chance to control the avatar at unsit. Maybe the seat gets an "Unsitting" event, gets one last chance to position or animate the avatar, and when the event handler returns, then the avatar disconnects from the seat.

  • Like 2
Link to comment
Share on other sites

There is also the problem of autopilot running (in the background) while sat on an object with a sittarget then selecting another object which can affect the rotation an avatar can have upon stand.

See the first pic in https://jira.secondlife.com/browse/BUG-216016

Edited by Lucia Nightfire
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 554 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
 Share

×
×
  • Create New...