Jump to content
Sign in to follow this  
Xiija

wiki question about sit target

Recommended Posts

http://wiki.secondlife.com/wiki/LlSitTarget

 

the page says....rot affects the position of the sit-target in a buggy way way.

 To correct for the rot bug, simply subtract <0,0,0.4> from the position when rot is zero. See example below. 

 

but the example says when NOT zero?

 

  if (rot!=ZERO_ROTATION) pos -=<0,0,0.4>;  //here is the work around

 

thanks for any clarification :P

Share this post


Link to post
Share on other sites

It is a very unclear specification.
I have some experience on the subject and in my oppinion:

  1. It is not a rotation bug but a position bug
  2. The correction is added to (or subtracted from) the avatar's local Z coordinates

I have no idea what is meant by 'when rot is zero'
The correction applies for any rotation, but always on the avatar' local Z axis

:smileysurprised::):smileyvery-happy:

 

Share this post


Link to post
Share on other sites

The 0.4 offset always needs to be used to correctly position a prim's llSitTarget, regardless of the position or rotation you calculate. However, llSitTarget(ZERO_VECTOR, ZERO_ROTATION) is a special case that removes the sit target entirely.

I believe the wiki is speaking as if you are making a method that automatically fixes the offset before applying the sit target, which in that case you'd want to check for the case of zero_vector and zero_rotation, and not apply the offset, so that the sit target can still be removed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...